:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --rating-star-color: #f5c400;
  --button-gradient-accent: linear-gradient(180deg, #FE9600 0%, #E54C00 100%);
  --button-gradient-accent-shadow: 0 10px 20px rgba(229, 76, 0, 0.24);
  --button-gradient-accent-shadow-hover: 0 14px 26px rgba(229, 76, 0, 0.30);
  --button-gradient-accent-focus: rgba(254, 150, 0, 0.28);
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: #fafafa;
  color: #111;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

input,
textarea,
select,
button {
  font: inherit;
}

select {
  max-width: 100%;
}

input,
textarea {
  width: 99%;
  padding: 10px 0px 10px 7px;
  border-radius: 10px;
  border: 1px solid #d9d9d9;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
}

textarea {
  min-height: 50px;
  resize: vertical;
}

button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: #111;
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #444;
}

button.success {
  background: #0a7a0a;
  color: #fff;
}

button.success:hover {
  background: #086308;
}

button.success:disabled {
  background: #9bc89b;
  cursor: not-allowed;
}

button.danger {
  background: #b00020;
  color: #fff;
}

button.danger:hover {
  background: #92001a;
}

button.danger:disabled {
  background: #e0a7b3;
  cursor: not-allowed;
}

a {
  color: #111;
}

.small {
  color: #666;
  font-size: 0.92rem;
}

.stars {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.star-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  /* border: 1px solid #d9d9d9; */
  background: #fff;
  color: var(--rating-star-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.star-btn.active {
  background: #111;
  color: var(--rating-star-color);
  border-color: #111;
}

.rating-star {
  color: var(--rating-star-color);
}

hr {
  border: 0;
  border-top: 1px solid #eee;
  margin: 14px 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar > * {
  min-width: 0;
}

.topbar > :last-child:not(:first-child) {
  margin-left: auto;
  text-align: right;
}

.review-topbar {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.review-topbar > :first-child {
  flex: 1 1 auto;
}

.review-topbar-logo {
  display: block;
  flex: 0 0 auto;
  align-self: flex-start;
  width: clamp(104px, 32vw, 160px);
  height: auto;
  max-height: 70px;
  object-fit: contain;
}

.super-title {
  color: #c62828;
}

/* Inline form so it sits next to links */
.inline-form {
  display: inline;
  margin: 0;
}

.inline-form button.link-ok,
button.link-ok {
  all: unset;
  color: #0a7a0a;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

/* Button that looks like a link */
.inline-form button.link-danger,
button.link-danger {
  all: unset;                /* ← THIS is the key line */
  color: #b00020;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.inline-form button.link-danger:hover,
button.link-danger:hover {
  text-decoration: none;
  opacity: 0.85;
}

.inline-form button.link-ok:hover,
button.link-ok:hover {
  text-decoration: none;
  opacity: 0.85;
}

.inline-form button.link-danger:focus,
button.link-danger:focus {
  outline: 2px solid rgba(176, 0, 32, 0.3);
  outline-offset: 2px;
}

.inline-form button.link-ok:focus,
button.link-ok:focus {
  outline: 2px solid rgba(10, 122, 10, 0.25);
  outline-offset: 2px;
}

.link-danger:hover {
  text-decoration: none;
  opacity: 0.85;
}

.actions {
  white-space: nowrap;
}
/* .actions .link-danger {
  margin-left: 4px;
} */

/* Admin shell */
.admin-shell-page {
  background:
    radial-gradient(920px 360px at 10% -12%, rgba(26, 86, 232, 0.14), transparent 58%),
    radial-gradient(860px 320px at 98% 0%, rgba(26, 86, 232, 0.09), transparent 60%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7fc 100%);
  color: #10233f;
}

.admin-shell-page a {
  color: #173c7c;
}

.admin-shell-page .small {
  color: #617690;
}

.admin-shell-app {
  width: min(100% - 24px, 1440px);
  margin: 0 auto;
  padding: 18px 0 28px;
}

.admin-shell-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  position: sticky;
  top: 18px;
  z-index: 20;
  padding: 16px 20px;
  border: 1px solid rgba(215, 225, 239, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 38px rgba(15, 33, 58, 0.08);
  backdrop-filter: blur(14px);
}

.admin-shell-brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-shell-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #0d1c36;
  text-decoration: none;
  min-width: 0;
}

.admin-shell-logo-mark {
  display: block;
  width: clamp(120px, 14vw, 154px);
  max-height: 42px;
  object-fit: contain;
}

.admin-shell-logo-fallback {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1a56e8 0%, #143fb0 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-shell-env-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.52rem 0.82rem;
  border-radius: 999px;
  border: 1px solid #d7e1ef;
  background: #f8fbff;
  color: #274368;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-shell-env-badge.is-super-admin {
  border-color: #f2c6cc;
  background: #fff1f3;
  color: #b42318;
}

.admin-shell-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-shell-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 7px;
  border-radius: 999px;
  border: 1px solid #d7e1ef;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 33, 58, 0.06);
}

.admin-shell-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #dfe8f5 0%, #c9d6e8 100%);
  color: #15325e;
  font-weight: 800;
}

.admin-shell-user-meta {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}

.admin-shell-user-meta strong {
  font-size: 0.92rem;
  color: #10233f;
}

.admin-shell-user-meta span {
  color: #5f7492;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.admin-shell-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.68rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #5f7492 0%, #10233f 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(15, 33, 58, 0.18);
}

.admin-shell-page a.admin-shell-logout,
.admin-shell-page a.admin-shell-logout:visited,
.admin-shell-page a.admin-shell-logout:hover,
.admin-shell-page a.admin-shell-logout:focus-visible,
.admin-shell-page a.admin-shell-logout:active {
  color: #fff;
}

.admin-shell-logout:hover {
  color: #fff;
  filter: brightness(1.03);
}

.admin-shell-layout {
  display: grid;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.admin-shell-sidebar {
  display: grid;
  gap: 18px;
  position: relative;
}

.admin-shell-sidebar-inner {
  display: grid;
  gap: 18px;
}

.admin-shell-sidebar-card {
  border: 1px solid #dbe5f0;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 30px rgba(15, 33, 58, 0.07);
}

.admin-shell-sidebar-label {
  margin-bottom: 14px;
  color: #5f7492;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-shell-field-label {
  display: block;
  margin-bottom: 8px;
  color: #17345e;
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-shell-select-wrap {
  position: relative;
}

.admin-shell-sidebar-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 11px 42px 11px 14px;
  border-radius: 14px;
  border: 1px solid #d5e0ec;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235f7492' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M1 1.25 6 6.25 11 1.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 14px center;
  background-size: auto, 12px 8px;
  color: #10233f;
}

.admin-shell-sidebar-helper {
  margin-top: 10px;
  color: #637995;
  font-size: 0.88rem;
  line-height: 1.5;
}

.vendor-admin-context-name {
  color: #10233f;
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.25;
}

.admin-shell-nav {
  display: grid;
  gap: 8px;
}

.admin-shell-nav-group {
  display: grid;
  gap: 8px;
}

.admin-shell-nav-compact {
  margin-top: 14px;
}

.admin-shell-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #18365f;
  text-decoration: none;
  font-weight: 650;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-shell-nav-link-button {
  width: 100%;
  justify-content: space-between;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.admin-shell-nav-link-copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-shell-nav-link-copy > span:last-child {
  font-weight: 650;
}

.admin-shell-nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5f7492;
}

.admin-shell-nav-link:hover {
  background: #f7fbff;
  border-color: #d9e4f1;
  transform: translateY(-1px);
}

.admin-shell-nav-link.is-active {
  background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
  border-color: #cddcf1;
  color: #0f2d63;
  box-shadow: 0 10px 22px rgba(26, 86, 232, 0.08);
}

.admin-shell-nav-link.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.admin-shell-nav-caret svg {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  transition: transform 0.18s ease;
}

.admin-shell-nav-link-button[aria-expanded="true"] .admin-shell-nav-caret svg {
  transform: rotate(180deg);
}

.admin-shell-subnav {
  display: grid;
  gap: 6px;
  margin-left: 22px;
  padding-left: 18px;
  border-left: 1px solid #d9e4f1;
}

.admin-shell-subnav[hidden] {
  display: none !important;
}

.admin-shell-subnav-link {
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: 12px;
  color: #4d6485;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.admin-shell-subnav-link::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: #c9d7ea;
  transform: translateY(-50%);
}

.admin-shell-subnav-link:hover {
  background: #f7fbff;
  color: #18365f;
}

.admin-shell-subnav-link.is-active {
  background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
  color: #0f2d63;
  box-shadow: inset 0 0 0 1px #cddcf1;
}

.admin-shell-subnav-link.is-active::before {
  width: 10px;
  background: #1a56e8;
}

.admin-shell-subnav-link.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.admin-shell-nav-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-shell-nav-icon svg {
  width: 100%;
  height: 100%;
}

.admin-shell-empty-state {
  padding: 14px;
  border: 1px dashed #ced9e8;
  border-radius: 16px;
  background: #f9fbfe;
  color: #637995;
  line-height: 1.5;
}

.admin-shell-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.admin-shell-main-head {
  padding: 4px 4px 0;
}

.admin-shell-page-title {
  margin: 0;
  color: #0c1f3e;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.admin-shell-content,
.admin-shell-stack {
  display: grid;
  gap: 18px;
}

.admin-shell-grid,
.admin-shell-grid-2-1,
.admin-shell-grid-1-2 {
  display: grid;
  gap: 18px;
}

.admin-shell-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-shell-toolbar-copy {
  max-width: 68ch;
}

.admin-shell-toolbar-title {
  margin: 0;
  color: #0f213a;
  font-size: 1.25rem;
}

.admin-shell-note {
  padding: 14px 16px;
  border: 1px solid #dde8f4;
  border-radius: 16px;
  background: #f8fbff;
  color: #5b7090;
  line-height: 1.6;
}

.admin-shell-table-wrap {
  overflow: auto;
}

.admin-shell-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-shell-table thead th {
  padding: 0 0 12px;
  color: #617690;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-shell-table td {
  padding: 14px 0;
  border-top: 1px solid #edf2f7;
  vertical-align: top;
}

.admin-shell-table th + th,
.admin-shell-table td + td {
  padding-left: 14px;
}

.admin-shell-page .card {
  border-color: #dbe5f0;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 28px rgba(15, 33, 58, 0.06);
}

.admin-shell-page hr {
  border-top-color: #e5edf6;
}

.admin-shell-page input,
.admin-shell-page select,
.admin-shell-page textarea {
  box-sizing: border-box;
  border-color: #d5e0ec;
  background: #fff;
  color: #10233f;
  border-radius: 13px;
}

.admin-shell-page input:focus,
.admin-shell-page select:focus,
.admin-shell-page textarea:focus {
  border-color: #8ca8d6;
  outline: 3px solid rgba(137, 169, 255, 0.22);
  outline-offset: 0;
}

.admin-shell-page button:not(.link-danger):not(.link-ok):not(.tab-btn):not(.admin-shell-nav-link-button):not(.admin-financials-sort):not(.secondary):not(.success):not(.danger):not(.button-gradient-accent):not(.label-template-card):not(.label-toggle-button):not(.admin-flash-dismiss) {
  background: linear-gradient(180deg, #1a56e8 0%, #143fb0 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(26, 86, 232, 0.18);
}

.admin-shell-page button.secondary {
  border: 1px solid #d1def0;
  background: #edf2fb;
  color: #244268;
  box-shadow: none;
}

.admin-shell-page .button-like {
  background: linear-gradient(180deg, #1a56e8 0%, #143fb0 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(26, 86, 232, 0.18);
}

.admin-shell-page .pill {
  border-color: #d3deec;
  background: #f7fbff;
  color: #244268;
}

.admin-shell-page .ok {
  color: #157347;
}

.admin-shell-page .warn {
  color: #9a6700;
}

.admin-shell-page .bad {
  color: #b42318;
}

.admin-shell-page .analytics-page,
.admin-shell-page .label-config-page {
  background: transparent;
}

.admin-flash {
  position: relative;
  padding-right: 56px;
}

.admin-flash-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5b6b82;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  line-height: 1;
}

.admin-flash-dismiss:hover {
  background: rgba(16, 35, 63, 0.08);
  color: #10233f;
}

.admin-flash-dismiss:focus-visible {
  background: rgba(16, 35, 63, 0.08);
  color: #10233f;
  outline: 3px solid rgba(137, 169, 255, 0.28);
  outline-offset: 2px;
}

.vendor-settings-spacer {
  height: 25px;
}

.admin-financials-stat-grid {
  display: grid;
  gap: 18px;
}

.admin-financials-stat-card {
  display: grid;
  gap: 8px;
}

.admin-financials-stat-label {
  color: #617690;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-financials-stat-card strong {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.1;
  color: #0c1f3e;
}

.admin-financials-form-grid {
  display: grid;
  gap: 16px;
}

.admin-financials-field {
  display: grid;
  gap: 8px;
}

.admin-financials-field > span {
  color: #16345f;
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-financials-divider {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, rgba(213, 224, 236, 0), rgba(213, 224, 236, 1), rgba(213, 224, 236, 0));
}

.admin-financials-status-chip {
  align-self: start;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #d3deec;
  background: #f7fbff;
  color: #244268;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.admin-financials-status-chip.is-complete {
  border-color: #b8e0ca;
  background: #ecf8f1;
  color: #17623c;
}

.admin-financials-status-chip.is-pending {
  border-color: #f1d7a7;
  background: #fff7e5;
  color: #935f00;
}

.admin-financials-notify-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px;
  border: 1px solid #dbe5f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
}

.admin-financials-notify-copy {
  flex: 1 1 320px;
}

.admin-financials-notify-copy h3 {
  margin: 0;
  color: #10233f;
  font-size: 1.05rem;
}

.admin-financials-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.admin-financials-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-financials-switch-ui {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: #d7e1ef;
  box-shadow: inset 0 0 0 1px rgba(137, 169, 255, 0.12);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.admin-financials-switch-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 33, 58, 0.18);
  transition: transform 0.18s ease;
}

.admin-financials-switch-input:checked + .admin-financials-switch-ui {
  background: linear-gradient(180deg, #1a56e8 0%, #143fb0 100%);
}

.admin-financials-switch-input:checked + .admin-financials-switch-ui .admin-financials-switch-knob {
  transform: translateX(26px);
}

.admin-financials-switch-input:focus-visible + .admin-financials-switch-ui {
  outline: 3px solid rgba(137, 169, 255, 0.32);
  outline-offset: 2px;
}

.admin-financials-switch-text {
  min-width: 64px;
  color: #17345e;
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-financials-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.admin-financials-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.75rem 1rem;
  border-radius: 13px;
  border: 1px solid #d1def0;
  background: #edf2fb;
  color: #244268;
  text-decoration: none;
  font-weight: 700;
}

.admin-financials-secondary-link:hover {
  background: #e5edf9;
  color: #173c7c;
}

.admin-financials-progress {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff8;
}

.admin-financials-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a56e8 0%, #38bdf8 100%);
}

.admin-financials-empty {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 24px;
  margin-top: 18px;
  border: 1px dashed #cddcf1;
  border-radius: 18px;
  background: #f9fbff;
}

.admin-financials-empty h3 {
  margin: 0;
  color: #0c1f3e;
}

.admin-financials-table-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.admin-financials-table-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-financials-control {
  display: grid;
  gap: 6px;
}

.admin-financials-control > span {
  color: #5f7492;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-financials-search {
  min-width: min(100%, 270px);
}

.admin-financials-search input {
  min-width: 220px;
}

.admin-financials-table thead th {
  padding-bottom: 14px;
}

.admin-financials-sort {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #617690;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  box-shadow: none;
  cursor: pointer;
}

.admin-financials-sort:hover {
  color: #173c7c;
}

.admin-financials-sort.is-active {
  color: #0f2d63;
}

.admin-financials-sort-indicator {
  min-width: 0.8rem;
  color: #1a56e8;
  font-size: 0.78rem;
  line-height: 1;
  text-transform: none;
}

.admin-financials-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-financials-status-badge.is-draft {
  border-color: #d7e1ef;
  background: #f7fbff;
  color: #486180;
}

.admin-financials-status-badge.is-issued {
  border-color: #cfe0ff;
  background: #edf4ff;
  color: #18438e;
}

.admin-financials-status-badge.is-due-soon {
  border-color: #f2d39a;
  background: #fff6df;
  color: #9a6700;
}

.admin-financials-status-badge.is-paid {
  border-color: #b8e0ca;
  background: #ecf8f1;
  color: #17623c;
}

.admin-financials-status-badge.is-overdue {
  border-color: #efc1c7;
  background: #fff1f3;
  color: #b42318;
}

.admin-financials-status-badge.is-void {
  border-color: #d7dce4;
  background: #f5f7fa;
  color: #516070;
}

.admin-financials-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.admin-financials-pagination-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-financials-table-empty-row {
  padding: 18px 0 !important;
  color: #617690;
  text-align: center;
}

.admin-financials-support-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 1020px) {
  .admin-shell-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .admin-shell-sidebar {
    align-self: start;
  }

  .admin-shell-sidebar-inner {
    position: fixed;
    top: var(--admin-shell-sidebar-top, 126px);
    left: var(--admin-shell-sidebar-left, 0px);
    width: var(--admin-shell-sidebar-width, 280px);
    max-height: calc(100vh - var(--admin-shell-sidebar-top, 126px) - 18px);
    overflow-y: auto;
    padding-right: 4px;
    box-sizing: border-box;
    overscroll-behavior: contain;
    z-index: 12;
  }
}

@media (min-width: 1180px) {
  .admin-shell-grid-2-1 {
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.48fr);
  }

  .admin-shell-grid-1-2 {
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.98fr);
  }

  .admin-financials-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-financials-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-financials-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-shell-app {
    width: min(100% - 16px, 1440px);
    padding-top: 12px;
  }

  .admin-shell-topbar {
    top: 12px;
    padding: 14px 16px;
    border-radius: 20px;
  }

  .admin-shell-user-meta {
    display: none;
  }

  .admin-financials-table-controls {
    width: 100%;
    justify-content: stretch;
  }

  .admin-financials-control,
  .admin-financials-search {
    width: 100%;
  }

  .admin-financials-search input {
    min-width: 0;
  }

  .admin-financials-pagination {
    align-items: stretch;
  }
}

.ok { color: #0a7a0a; }
.bad { color: #b00020; }
.warn { color: #b8860b; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
table.preview td, table.preview th { padding: 8px 6px; vertical-align: top; }
.pill { display:inline-block; padding:2px 8px; border:1px solid #eee; border-radius:999px; font-size:12px; }
.button-like {
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  background:#111;
  color:#fff;
  text-decoration:none;
  font-weight:600;
}
.button-like:hover { opacity:0.9; } 

.import-help {
  display: grid;
  gap: 18px;
}

.import-help-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 860px) {
  .import-help-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.import-help-section {
  display: grid;
  gap: 16px;
}

.import-help-block {
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 16px;
  background: #fcfcfc;
}

.import-help-block h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
}

.import-help-block p {
  margin: 0;
  color: #444;
  line-height: 1.55;
}

.import-help-list {
  margin: 0;
  padding-left: 20px;
  color: #444;
  line-height: 1.6;
}

.import-help-list li + li {
  margin-top: 10px;
}

.import-help-label {
  margin: 0 0 8px 0;
  color: #555;
  font-size: 0.92rem;
  font-weight: 600;
}

.import-help-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-help-tags .pill {
  padding: 4px 10px;
  font-size: 0.82rem;
  border-color: #e3e3e3;
  background: #fff;
}

.import-help-download {
  align-content: start;
  background:
    linear-gradient(135deg, rgba(198, 40, 40, 0.05), rgba(198, 40, 40, 0.01)),
    #fff;
}

.import-help-download .button-like {
  justify-self: start;
}

.import-help-download-note {
  color: #555;
  line-height: 1.55;
}

.qr-thumb {
  width: 55px;
  height: 55px;
  border-radius: 6px;
  border: 1px solid #eee;
  object-fit: contain;
  background: #fff;
  vertical-align: middle;
  display: none; /* hidden until loaded */
}
.qr-actions { white-space: nowrap; }
.qr-actions a { margin-right: 8px; }

.product-image-frame {
  width: min(100%, 360px);
  min-height: 220px;
  border: 1px solid #ddd;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.03), rgba(17, 17, 17, 0.01)),
    repeating-linear-gradient(
      45deg,
      #fafafa,
      #fafafa 12px,
      #f1f1f1 12px,
      #f1f1f1 24px
    );
}

.product-image-preview {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  background: rgba(255, 255, 255, 0.75);
}

.review-product-image {
  display: block;
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  margin-top: 12px;
  border-radius: 12px;
}

.product-image-empty {
  max-width: 220px;
  padding: 18px;
  text-align: center;
  color: #666;
  line-height: 1.45;
}

.product-image-empty strong,
.product-image-empty span {
  display: block;
}

.product-image-empty span {
  margin-top: 6px;
  font-size: 0.92rem;
}

.bulkbar {
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin: 10px 0 14px 0;
}
.bulk-left { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.bulk-left label { display:flex; gap:8px; align-items:center; }

/* Tabs */
.tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid #d7e3f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.tab-btn {
  position: relative;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #5c7190;
  cursor: pointer;
  font-weight: 700;
  box-shadow: none;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.tab-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  color: #18365f;
  border-color: #d2ddeb;
  transform: translateY(-1px);
}
.tab-btn:focus-visible {
  outline: 2px solid rgba(26, 86, 232, 0.28);
  outline-offset: 2px;
}
.tab-btn.active,
.tab-btn[aria-selected="true"] {
  border-color: #cad9ec;
  background: #ffffff;
  color: #102b5c;
  box-shadow: 0 10px 18px rgba(16, 35, 63, 0.08);
}
.tab-btn.active::after,
.tab-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a56e8 0%, #4f8cff 100%);
}
.admin-shell-page .tabs {
  border-color: #d7e3f0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}
.admin-shell-page .tab-btn {
  background: transparent;
  color: #5c7190;
}
.admin-shell-page .tab-btn:hover {
  background: rgba(255, 255, 255, 0.76);
  color: #18365f;
  border-color: #d2ddeb;
}
.admin-shell-page .tab-btn.active,
.admin-shell-page .tab-btn[aria-selected="true"] {
  background: #ffffff;
  color: #102b5c;
  border-color: #cad9ec;
  box-shadow: 0 10px 18px rgba(16, 35, 63, 0.08);
}

/* Top/Bottom tables styling */
.top-table {
  border-left: 6px solid #0a7a0a;
}
.bottom-table {
  border-left: 6px solid #b00020;
}

/* Ensure delete controls render as text links, not filled buttons */
button.link-danger {
  all: unset;
  color: #b00020;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}
button.link-danger:hover {
  text-decoration: none;
  opacity: 0.85;
}
button.link-danger:focus {
  outline: 2px solid rgba(176, 0, 32, 0.3);
  outline-offset: 2px;
}

/* Analytics page (page-scoped) */
.analytics-page {
  background:
    radial-gradient(900px 320px at 10% -10%, rgba(37, 99, 235, 0.10), transparent 60%),
    radial-gradient(900px 320px at 90% -20%, rgba(59, 130, 246, 0.08), transparent 60%),
    #f6f8fb;
}
.analytics-page .container {
  max-width: 1120px;
  padding-top: 24px;
  padding-bottom: 36px;
}
.analytics-page .small { color: #5b6678; }
.analytics-page hr { border-top-color: #e4ebf3; }
.analytics-page .analytics-shell {
  border-color: #d7e0ea;
  background: linear-gradient(180deg, #f8fbff 0, #ffffff 140px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.analytics-page .card {
  border-color: #dde6f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.analytics-page .top-table {
  border-left-color: #0a7a0a;
}
.analytics-page .bottom-table {
  border-left-color: #b00020;
}
.analytics-page .kpi-card {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-color: #d8e5fb;
}
.analytics-page .metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.analytics-page .analytics-trend {
  color: #0f172a;
}
.analytics-page .analytics-trend--up {
  color: #157347;
}
.analytics-page .analytics-trend--down {
  color: #b42318;
}
.analytics-page .analytics-trend--flat {
  color: #9a6700;
}
.analytics-page .analytics-trend--none {
  color: #64748b;
}
.analytics-page .section-title {
  font-weight: 700;
  margin-bottom: 10px;
  color: #0f172a;
}
.analytics-page .section-title.tight { margin-bottom: 6px; }
.analytics-page .section-title.compact { margin-bottom: 8px; }
.analytics-page input,
.analytics-page select,
.analytics-page textarea {
  border-color: #d6e0eb;
  background: #fff;
}
.analytics-page button:not(.tab-btn):not(.secondary):not(.danger):not(.success):not(.admin-flash-dismiss) {
  background: #2563eb;
  color: #fff;
}
.analytics-page button.secondary {
  background: #475569;
  color: #fff;
}
.analytics-page .button-like {
  background: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.20);
}
.analytics-page .button-like:hover {
  opacity: 1;
  filter: brightness(0.98);
}
.analytics-page table thead th {
  color: #475569;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding-bottom: 8px;
}
.analytics-page #prodList.card {
  background: #fbfcfe;
  border-color: #e4ebf3;
}
.analytics-page canvas {
  background: #fbfdff;
  border-radius: 8px;
}
.analytics-page .chart-frame {
  position: relative;
  width: 100%;
}
.analytics-page .chart-frame canvas {
  display: block;
}
.analytics-page .chart-frame-sm {
  height: 220px;
}
.analytics-page .chart-frame-xs {
  height: 150px;
}
.analytics-page .chart-frame-md {
  height: 260px;
}
.analytics-page .m-0 { margin: 0; }
.analytics-page .gap-v-10 { height: 10px; }
.analytics-page .gap-v-12 { height: 12px; }
.analytics-page .p-12 { padding: 12px; }
.analytics-page .p-10 { padding: 10px; }
.analytics-page .mt-6 { margin-top: 6px; }
.analytics-page .mt-8 { margin-top: 8px; }
.analytics-page .mt-10 { margin-top: 10px; }
.analytics-page .mb-8 { margin-bottom: 8px; }
.analytics-page .mb-10 { margin-bottom: 10px; }
.analytics-page .mb-12 { margin-bottom: 12px; }
.analytics-page .table-full {
  width: 100%;
  border-collapse: collapse;
}
.analytics-page .row-divider {
  border-top: 1px solid #eee;
}
.analytics-page .analytics-filters-card {
  padding: 8px 10px;
  border-color: #dbe5f1;
  background: #fbfcfe;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.03);
}
.analytics-page .analytics-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: end;
}
.analytics-page .analytics-filter-control {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.analytics-page .analytics-filter-control--range {
  flex: 0 1 210px;
}
.analytics-page .analytics-filter-control--range select {
  width: 100%;
  height: 35px;
  box-sizing: border-box;
  padding: 0 10px;
  border-radius: 9px;
  border-color: #d6e0eb;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
}
.analytics-page .analytics-filter-control--products {
  flex: 1 1 360px;
}
.analytics-page .analytics-filter-control--products .analytics-multiselect {
  max-width: none;
}
.analytics-page .analytics-filter-control--products .analytics-multiselect-panel {
  max-width: none;
}
.analytics-page .analytics-filter-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.analytics-page .analytics-filter-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #0f172a;
}
.analytics-page .analytics-multiselect {
  position: relative;
  margin-top: 0;
  max-width: 720px;
}
.analytics-page .analytics-multiselect-trigger {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #d4deeb;
  border-radius: 9px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.analytics-page .analytics-multiselect-trigger:focus-visible {
  outline: 3px solid rgba(137, 169, 255, 0.22);
  outline-offset: 0;
}
.analytics-page .analytics-multiselect.is-open .analytics-multiselect-trigger {
  border-color: #7ea0d8;
  box-shadow:
    0 0 0 3px rgba(137, 169, 255, 0.12);
  transform: none;
}
.analytics-page .analytics-multiselect-values {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  overflow: hidden;
  line-height: 1;
}
.analytics-page .analytics-multiselect-placeholder {
  color: #5b6d84;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-page .analytics-multiselect-chips {
  display: flex;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  overflow: hidden;
}
.analytics-page .analytics-multiselect-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid #d6e0eb;
  background: #f5f8fc;
  color: #334155;
  font-size: 0.78rem;
  line-height: 1.05;
  white-space: nowrap;
  box-shadow: none;
}
.analytics-page .analytics-multiselect-chip--summary {
  border-color: #dbe5f1;
  background: #f8fafc;
  color: #64748b;
  box-shadow: none;
}
.analytics-page .analytics-multiselect-chip-remove,
.analytics-page .analytics-multiselect-search-clear {
  border: 0;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  padding: 0;
  min-width: 0;
  line-height: 1;
}
.analytics-page .analytics-multiselect-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  font-size: 0.8rem;
  opacity: 0.9;
}
.analytics-page .analytics-multiselect-chip-remove:hover,
.analytics-page .analytics-multiselect-search-clear:hover {
  opacity: 1;
}
.analytics-page .analytics-multiselect-caret {
  color: #64748b;
  font-size: 0.66rem;
  transition: transform 0.18s ease;
}
.analytics-page .analytics-multiselect.is-open .analytics-multiselect-caret {
  transform: rotate(180deg);
}
.analytics-page .analytics-multiselect-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  width: 100%;
  max-width: 420px;
  padding: 10px;
  border: 1px solid #d8e3f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}
.analytics-page .analytics-multiselect-search {
  position: relative;
}
.analytics-page .analytics-multiselect-search input {
  width: 100%;
  padding-right: 36px;
}
.analytics-page .analytics-multiselect-search-clear {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #64748b !important;
  font-size: 1rem;
}
.analytics-page .analytics-multiselect-option {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-radius: 10px;
  cursor: pointer;
}
.analytics-page .analytics-multiselect-option:hover {
  background: #f6f9fe;
}
.analytics-page .analytics-multiselect-option input[type="checkbox"] {
  accent-color: #315780;
}
.analytics-page .analytics-multiselect-option--select-all {
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7eef8;
}
.analytics-page .analytics-multiselect-options {
  max-height: 260px;
  overflow: auto;
  margin-top: 6px;
  padding-right: 2px;
}
.analytics-page .analytics-multiselect-empty {
  padding: 8px 4px 2px;
  color: #64748b;
}
.analytics-page .prod-list {
  max-height: 260px;
  overflow: auto;
  padding: 10px;
}
.analytics-page .prod-item-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 4px;
}
.analytics-page .pager-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
@media (max-width: 640px) {
  .analytics-page .analytics-filters-card {
    padding: 8px;
  }
  .analytics-page .analytics-filter-control {
    padding: 0;
  }
  .analytics-page .analytics-filter-toolbar {
    gap: 10px;
  }
  .analytics-page .analytics-filter-control--range,
  .analytics-page .analytics-filter-control--products {
    flex-basis: 100%;
  }
  .analytics-page .analytics-filter-heading {
    margin-bottom: 3px;
  }
  .analytics-page .analytics-multiselect-panel {
    max-width: none;
  }
}
.analytics-page .comment-item {
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 10px;
}

/* Label configurator */
.label-config-page {
  background:
    radial-gradient(900px 320px at 10% -10%, rgba(13, 148, 136, 0.12), transparent 55%),
    radial-gradient(900px 320px at 100% 0%, rgba(249, 115, 22, 0.12), transparent 58%),
    #f4f1eb;
}

.label-config-page .container {
  max-width: 1240px;
  padding-top: 24px;
  padding-bottom: 36px;
}

.label-config-shell {
  border-color: #d9d0c6;
  background: linear-gradient(180deg, #faf7f2 0%, #ffffff 140px);
  box-shadow: 0 16px 40px rgba(58, 45, 30, 0.08);
}

.label-config-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

@media (min-width: 980px) {
  .label-config-grid {
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
    align-items: start;
  }
}

.label-config-column {
  display: grid;
  gap: 18px;
}

.label-config-panel,
.label-config-preview-card {
  border-color: #e1d8cd;
  background: #fffdf9;
}

@media (min-width: 980px) {
  .label-config-sidebar {
    position: sticky;
    top: 18px;
    z-index: 2;
    align-self: start;
  }
}

.label-config-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.label-config-section-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.label-config-alert {
  margin-top: 16px;
}

.label-config-alert.is-warning {
  border-color: #f6c566;
  background: #fff7e5;
}

.label-config-field,
.label-config-field-grid {
  margin-bottom: 14px;
}

.label-config-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.label-config-field-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .label-config-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.label-config-inline {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.label-config-inline input[type="color"] {
  width: 100%;
  height: 46px;
  padding: 0;
}

.label-template-cards {
  display: grid;
  gap: 10px;
}

.label-template-card {
  text-align: left;
  background: #f6efe3;
  color: #382c1e;
  border: 1px solid #ddcfbd;
  padding: 14px;
  border-radius: 14px;
}

.label-template-card strong,
.label-template-card span {
  display: block;
}

.label-template-card span {
  font-size: 0.92rem;
  color: #6c5a44;
  margin-top: 4px;
}

.label-template-card.is-active {
  background: linear-gradient(135deg, #114b5f, #1f6f78);
  color: #fff;
  border-color: #114b5f;
}

.label-template-card.is-active span {
  color: rgba(255, 255, 255, 0.82);
}

.label-toggle-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.label-toggle-group button {
  background: #f6efe3;
  color: #382c1e;
  border: 1px solid #ddcfbd;
}

.label-toggle-group button.is-active {
  background: #c2410c;
  color: #fff;
  border-color: #c2410c;
}

.label-config-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.label-range-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #ddcfbd;
  background: #fff;
  font-weight: 600;
}

.label-config-expert {
  margin-top: 12px;
  border: 1px solid #eadfce;
  border-radius: 14px;
  padding: 12px 14px 2px;
  background: #fcfaf6;
}

.label-config-expert summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 12px;
}

.label-config-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.label-config-actions button {
  flex: 1 1 180px;
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) button.secondary {
  border: 1px solid #ddcfbd;
  background: #f6efe3;
  color: #382c1e;
  box-shadow: none;
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) button.secondary:hover {
  background: #efe3d1;
  color: #2f2418;
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) button.label-template-card:not(.tab-btn):not(.secondary):not(.danger):not(.success) {
  background: #f6efe3;
  color: #382c1e;
  border: 1px solid #ddcfbd;
  box-shadow: none;
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) button.label-template-card:not(.tab-btn):not(.secondary):not(.danger):not(.success) span {
  color: #6c5a44;
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) button.label-template-card.is-active:not(.tab-btn):not(.secondary):not(.danger):not(.success) {
  background: linear-gradient(135deg, #114b5f, #1f6f78);
  color: #fff;
  border-color: #114b5f;
  box-shadow: none;
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) button.label-template-card.is-active:not(.tab-btn):not(.secondary):not(.danger):not(.success) span {
  color: rgba(255, 255, 255, 0.82);
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) .label-toggle-group button:not(.tab-btn):not(.secondary):not(.danger):not(.success) {
  background: #f6efe3;
  color: #382c1e;
  border: 1px solid #ddcfbd;
  box-shadow: none;
}

.admin-shell-page :is(.label-config-page, .label-config-embedded) .label-toggle-group button.is-active:not(.tab-btn):not(.secondary):not(.danger):not(.success) {
  background: #c2410c;
  color: #fff;
  border-color: #c2410c;
  box-shadow: none;
}

.label-config-status {
  margin-top: 16px;
  display: grid;
  gap: 6px;
  color: #5a5146;
  font-size: 0.94rem;
}

.label-config-preview-wrap {
  border-radius: 18px;
  border: 1px solid #eadfce;
  background:
    linear-gradient(135deg, rgba(17, 75, 95, 0.06), transparent 42%),
    #fff;
  padding: 18px;
}

.label-config-preview-wrap svg {
  width: 100%;
  display: block;
  aspect-ratio: 5 / 3;
}

.label-warning-groups {
  display: grid;
  gap: 16px;
}

.label-warning-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.label-warning-title.is-error {
  color: #b42318;
}

.label-warning-title.is-warning {
  color: #a15c07;
}

.label-warning-list {
  margin: 0;
  padding-left: 20px;
  color: #4e4337;
}

.label-warning-list li + li {
  margin-top: 6px;
}

.label-warning-list .is-empty {
  color: #7d7265;
}

.label-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.5);
  z-index: 1000;
}

.label-modal-card {
  max-width: 440px;
  width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.24);
}

.label-modal-card h2 {
  margin-top: 0;
}

.label-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Admin login page */
.admin-login-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 440px at 12% -8%, rgba(37, 99, 235, 0.12), transparent 70%),
    radial-gradient(760px 360px at 95% 8%, rgba(37, 99, 235, 0.08), transparent 72%),
    linear-gradient(180deg, #f9fbff 0%, #f4f7fc 100%);
  color: #0f213a;
}

.admin-login-page .container {
  max-width: 1180px;
  padding-left: 24px;
  padding-right: 24px;
}

.admin-login-page .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 252, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.admin-login-page .site-header.scrolled {
  box-shadow: 0 8px 26px rgba(15, 33, 58, 0.1);
  border-color: rgba(195, 210, 232, 0.9);
  background: rgba(255, 255, 255, 0.94);
}

.admin-login-page .header-row {
  min-height: 50px;
  display: flex;
  align-items: center;
}

.admin-login-page .logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  color: #0c0b34;
  white-space: nowrap;
}

.admin-login-page .logo-mark {
  display: block;
  height: clamp(34px, 5vw, 46px);
  width: auto;
}

.admin-login-page .logo-text {
  font-weight: 800;
  font-size: 1.24rem;
  letter-spacing: 0.01em;
}

.admin-login-main {
  box-sizing: border-box;
  position: relative;
  min-height: calc(100svh - 78px);
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  padding: clamp(1.15rem, 3vw, 2rem) 0 clamp(2rem, 5vw, 3rem);
}

.admin-login-main::before {
  content: "";
  position: absolute;
  inset: 10% auto auto 50%;
  width: min(960px, 78vw);
  height: min(480px, 40vw);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.admin-login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
}

.admin-login-floor {
  position: absolute;
  left: 50%;
  bottom: max(18px, 4vh);
  width: min(1320px, 142vw);
  height: clamp(230px, 34vw, 380px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.admin-login-floor-tile {
  position: absolute;
  clip-path: polygon(25% 7%, 75% 7%, 100% 50%, 75% 93%, 25% 93%, 0 50%);
  border: 2px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 30px rgba(123, 155, 190, 0.08);
  opacity: 0.95;
}

.admin-login-floor-tile.tile-1 {
  left: 0%;
  bottom: 18%;
  width: 20%;
  height: 34%;
  background: linear-gradient(145deg, rgba(222, 240, 235, 0.8), rgba(214, 231, 241, 0.6));
}

.admin-login-floor-tile.tile-2 {
  left: 12%;
  bottom: 38%;
  width: 17%;
  height: 26%;
  background: linear-gradient(145deg, rgba(225, 241, 233, 0.75), rgba(216, 235, 244, 0.58));
}

.admin-login-floor-tile.tile-3 {
  left: 18%;
  bottom: 2%;
  width: 24%;
  height: 42%;
  background: linear-gradient(145deg, rgba(216, 232, 247, 0.84), rgba(226, 240, 247, 0.66));
}

.admin-login-floor-tile.tile-4 {
  left: 33%;
  bottom: 32%;
  width: 20%;
  height: 30%;
  background: linear-gradient(145deg, rgba(226, 239, 246, 0.78), rgba(236, 241, 221, 0.62));
}

.admin-login-floor-tile.tile-5 {
  left: 43%;
  bottom: 0%;
  width: 24%;
  height: 44%;
  background: linear-gradient(145deg, rgba(221, 239, 233, 0.82), rgba(210, 227, 242, 0.62));
}

.admin-login-floor-tile.tile-6 {
  left: 58%;
  bottom: 31%;
  width: 19%;
  height: 28%;
  background: linear-gradient(145deg, rgba(216, 233, 247, 0.82), rgba(229, 241, 236, 0.58));
}

.admin-login-floor-tile.tile-7 {
  left: 67%;
  bottom: 1%;
  width: 23%;
  height: 41%;
  background: linear-gradient(145deg, rgba(218, 232, 247, 0.82), rgba(230, 240, 247, 0.64));
}

.admin-login-floor-tile.tile-8 {
  left: 81%;
  bottom: 14%;
  width: 19%;
  height: 36%;
  background: linear-gradient(145deg, rgba(226, 241, 235, 0.76), rgba(212, 232, 241, 0.58));
}

.admin-login-panel {
  position: relative;
  width: min(100%, 620px);
  padding: clamp(1.3rem, 3.4vw, 2rem);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    radial-gradient(220px 120px at 50% 0%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #1958e0 0%, #1445b8 48%, #0f348d 100%);
  box-shadow: 0 30px 64px rgba(17, 69, 178, 0.28);
  text-align: center;
  overflow: hidden;
}

.admin-login-panel::before,
.admin-login-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.admin-login-panel::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  clip-path: polygon(0 0, 42% 0, 58% 100%, 0 100%);
}

.admin-login-panel::after {
  background: linear-gradient(225deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%);
}

.admin-login-panel > * {
  position: relative;
  z-index: 1;
}

.admin-login-copy {
  display: grid;
  gap: 0.95rem;
  justify-items: center;
}

.admin-login-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(246, 251, 255, 0.96);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-login-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.85rem, 4.3vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.admin-login-lead {
  margin: 0;
  max-width: 34ch;
  color: rgba(242, 247, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
}

.admin-login-alert {
  margin: 1.2rem auto 0;
  width: min(100%, 470px);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  text-align: left;
  backdrop-filter: blur(8px);
}

.admin-login-alert strong {
  display: block;
}

.admin-login-alert.is-error {
  background: rgba(136, 29, 26, 0.2);
  border: 1px solid rgba(255, 219, 215, 0.26);
  color: #fff4f1;
}

.admin-login-alert.is-success {
  background: rgba(220, 244, 228, 0.16);
  border: 1px solid rgba(219, 246, 227, 0.24);
  color: #effcf3;
}

.admin-login-alert-list {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.admin-login-alert-list li + li {
  margin-top: 0.25rem;
}

.admin-login-form {
  width: min(100%, 450px);
  margin: 1.2rem auto 0;
  display: grid;
  gap: 0.9rem;
  text-align: left;
}

.admin-login-field {
  display: grid;
  gap: 0.42rem;
  width: 100%;
}

.admin-login-field label {
  color: rgba(247, 250, 255, 0.98);
  font-size: 0.92rem;
  font-weight: 700;
}

.admin-login-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-login-link {
  color: #f7fbff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 251, 255, 0.45);
  transition: color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.admin-login-link:hover {
  color: #fff;
  border-color: #fff;
}

.admin-login-page :focus-visible {
  outline: 3px solid rgba(137, 169, 255, 0.82);
  outline-offset: 3px;
}

.admin-login-page .admin-login-field input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.92rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(191, 209, 241, 0.95);
  background: rgba(255, 255, 255, 0.98);
  color: #0f213a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 12px 24px rgba(11, 31, 80, 0.1);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-login-page .admin-login-field input::placeholder {
  color: #8a97ab;
}

.admin-login-page .admin-login-field input:focus {
  border-color: #7aa6ff;
  box-shadow: 0 0 0 4px rgba(133, 167, 255, 0.18), 0 16px 28px rgba(11, 31, 80, 0.14);
  transform: translateY(-1px);
  outline: 0;
}

.admin-shell-page button.button-gradient-accent:not(.link-danger):not(.link-ok):not(.tab-btn):not(.admin-shell-nav-link-button):not(.admin-financials-sort),
button.button-gradient-accent:not(.tab-btn):not(.secondary):not(.danger):not(.success),
input[type="submit"].button-gradient-accent,
input[type="button"].button-gradient-accent,
.button-like.button-gradient-accent {
  background: var(--button-gradient-accent);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--button-gradient-accent-shadow);
  transition: box-shadow 0.16s ease, filter 0.16s ease;
}

.admin-shell-page button.button-gradient-accent:not(.link-danger):not(.link-ok):not(.tab-btn):not(.admin-shell-nav-link-button):not(.admin-financials-sort):hover,
button.button-gradient-accent:not(.tab-btn):not(.secondary):not(.danger):not(.success):hover,
input[type="submit"].button-gradient-accent:hover,
input[type="button"].button-gradient-accent:hover,
.button-like.button-gradient-accent:hover {
  box-shadow: var(--button-gradient-accent-shadow-hover);
  filter: brightness(1.01);
}

.admin-shell-page button.button-gradient-accent:not(.link-danger):not(.link-ok):not(.tab-btn):not(.admin-shell-nav-link-button):not(.admin-financials-sort):focus-visible,
button.button-gradient-accent:not(.tab-btn):not(.secondary):not(.danger):not(.success):focus-visible,
input[type="submit"].button-gradient-accent:focus-visible,
input[type="button"].button-gradient-accent:focus-visible,
.button-like.button-gradient-accent:focus-visible {
  outline: 2px solid var(--button-gradient-accent-focus);
  outline-offset: 2px;
}

.admin-login-submit {
  width: auto;
  min-width: 230px;
  min-height: 0;
  margin-top: 0.15rem;
  justify-self: center;
  padding: 0.85rem 1.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--button-gradient-accent);
  color: #ffffff;
  /* font-weight: 800; */
  letter-spacing: 0.01em;
  box-shadow: 0 18px 30px rgba(8, 30, 82, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.admin-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 34px rgba(8, 30, 82, 0.22);
  filter: brightness(1.01);
}

.admin-login-support {
  margin: 1.05rem auto 0;
  max-width: 38ch;
  color: rgba(241, 246, 255, 0.88);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .admin-login-page .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .admin-login-main {
    align-items: flex-start;
    min-height: auto;
  }

  .admin-login-floor {
    width: 168vw;
    height: 280px;
    bottom: 0;
  }

  .admin-login-field-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .admin-login-page .header-row {
    min-height: 72px;
  }

  .admin-login-panel {
    padding: 1.35rem 1rem;
    border-radius: 26px;
  }

  .admin-login-copy h1 {
    font-size: clamp(1.9rem, 11vw, 2.45rem);
  }

  .admin-login-lead {
    font-size: 0.96rem;
  }

  .admin-login-form {
    gap: 0.9rem;
  }

  .admin-login-submit {
    width: min(100%, 300px);
  }

  .admin-login-floor {
    width: 184vw;
    height: 220px;
    bottom: 6px;
  }

  .admin-login-floor-tile {
    border-width: 1px;
  }
}

