.content-grid {
  display: grid;
  gap: 12px;
}

.content-grid.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(20, 30, 60, .035);
  padding: 14px;
}

.panel + .panel,
.content-grid + .panel,
.panel + .content-grid {
  margin-top: 12px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  margin: -2px -2px 12px;
  padding: 0 2px 10px;
}

.panel-head h2 {
  margin: 0;
  color: #101828;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-head a {
  color: var(--blue-strong);
  font-weight: 850;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metrics-grid.small,
.metrics-grid.accounts-metrics {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.metrics-grid.crud-metrics {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.metric {
  display: grid;
  gap: 6px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 5px 14px rgba(20, 30, 60, .035);
  padding: 12px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  color: #101828;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0;
}

.metric-blue { border-left-color: var(--blue); }
.metric-green { border-left-color: var(--green); }
.metric-orange { border-left-color: var(--orange); }
.metric-red { border-left-color: var(--red); }
.metric-violet { border-left-color: var(--violet); }
.metric-gray { border-left-color: #64748b; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.quick-actions a {
  display: grid;
  gap: 5px;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.quick-actions strong {
  color: #111827;
  font-size: 14px;
}

.quick-actions span {
  color: var(--muted);
  font-size: 12px;
}

.legacy-home-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 6px 18px rgba(20, 30, 60, .04);
  margin-bottom: 12px;
  padding: 14px;
}

.legacy-home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.legacy-home-profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.legacy-home-mark {
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(15, 23, 42, .08);
  border-radius: 50%;
  background: #0f1f33;
  color: #f4e558;
  font-weight: 900;
}

.legacy-home-profile strong,
.legacy-home-profile em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-home-profile strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.legacy-home-profile em {
  margin-top: 3px;
  color: #0f766e;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.legacy-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 999px;
  background: linear-gradient(90deg, #48b0ff, #1e90ff);
  color: #fff;
  padding: 8px 16px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(30, 144, 255, .22);
}

.legacy-primary-action:hover {
  color: #fff;
  transform: translateY(-1px);
}

.legacy-primary-action .legacy-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.legacy-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px 10px;
}

.legacy-feature {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-height: 106px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}

.legacy-feature:hover {
  border-color: #dbe7f5;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 30, 60, .07);
  transform: translateY(-1px);
}

.legacy-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #f3f6fa;
  box-shadow: 0 4px 10px rgba(20, 30, 60, .03);
  margin-bottom: 8px;
}

.legacy-feature-icon .legacy-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.legacy-feature-label {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  color: #20283a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bg-p1 { background: linear-gradient(180deg, #fff7ed, #fff1e0); }
.bg-p2 { background: linear-gradient(180deg, #ebf8ff, #e6f4ff); }
.bg-p3 { background: linear-gradient(180deg, #f3e8ff, #f6ecff); }
.bg-p4 { background: linear-gradient(180deg, #eef2ff, #f7fbff); }
.bg-p5 { background: linear-gradient(180deg, #e6fffa, #eafaf7); }
.bg-p6 { background: linear-gradient(180deg, #fff1f2, #fff5f7); }

.app-menu-modal[hidden] {
  display: none;
}

.app-menu-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.app-menu-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, .46);
}

.app-menu-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: end center;
  min-height: 100%;
  padding: 18px;
}

.app-menu-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  padding: 14px;
}

.app-menu-head,
.app-menu-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-menu-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.app-menu-profile {
  min-width: 0;
}

.app-menu-profile strong,
.app-menu-profile em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu-profile strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.app-menu-profile em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
}

.app-menu-close {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: #eef2f7;
  color: #344054;
  padding: 0 12px;
  font-weight: 850;
}

.app-menu-primary {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  border: 2px solid #0ea5e9;
  border-radius: 18px;
  background: linear-gradient(135deg, #e0f2fe 0%, #ccfbf1 100%);
  color: #075985;
  box-shadow: 0 14px 34px rgba(14, 165, 233, .2);
  margin-bottom: 16px;
  padding: 16px 18px;
}

.app-menu-primary:hover {
  color: #075985;
  transform: translateY(-1px);
}

.app-menu-primary .qr-icon {
  display: grid;
  place-items: center;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .12);
}

.app-menu-primary .legacy-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.app-menu-primary strong,
.app-menu-primary em {
  display: block;
}

.app-menu-primary strong {
  color: #07559b;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 900;
  text-transform: uppercase;
}

.app-menu-primary em {
  margin-top: 5px;
  color: #0f766e;
  font-style: normal;
  font-size: 13px;
  font-weight: 750;
}

.app-menu-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 90px;
  margin: 4px 0 12px;
}

.app-menu-mini-action {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(248, 250, 252, .82);
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, .65);
}

.app-menu-mini-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}

.app-menu-mini-action .legacy-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.app-menu-section-title {
  margin: 12px 0 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-menu-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 6px;
  margin-bottom: 8px;
}

.app-menu-feature {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-height: 108px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}

.app-menu-feature:hover,
.app-menu-feature.active {
  border-color: #dbe7f5;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 30, 60, .07);
}

.app-menu-feature span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: #20283a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.bar-row:last-child {
  border-bottom: 0;
}

.bar-row strong {
  display: block;
  color: #1f2937;
  font-size: 13px;
}

.bar-row span {
  color: var(--muted);
  font-size: 12px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-neutral {
  border-color: #d8dee8;
  background: #eef2f7;
  color: #475467;
}

.status-paid {
  border-color: #bcebd3;
  background: #e7f8ef;
  color: #027a48;
}

.status-waiting {
  border-color: #fed7aa;
  background: #fff4df;
  color: #b45309;
}

.status-cancelled {
  border-color: #fecdd3;
  background: #fff0f1;
  color: #be123c;
}

.inline-warning {
  margin: 0 0 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.toast-stack {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.app-toast {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
  border: 1px solid #dbe4ef;
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .18);
  padding: 10px 10px 10px 12px;
  color: #101828;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  pointer-events: auto;
  animation: toast-in .16s ease-out;
}

.app-toast-success { border-left-color: var(--green); }
.app-toast-error { border-left-color: var(--red); }
.app-toast-warning { border-left-color: var(--orange); }

.app-toast button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  line-height: 1;
  padding: 0;
}

.app-toast.leaving {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .14s ease, transform .14s ease;
}

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

@keyframes modal-rise {
  from { opacity: .72; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

body.modal-open {
  overflow: hidden;
}

.crud-modal {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: grid;
  place-items: center;
  padding: 18px;
}

.crud-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .46);
}

.crud-modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  padding: 16px;
  animation: modal-rise .14s ease-out;
}

.crud-modal-card.is-wide {
  width: min(760px, 100%);
}

.crud-modal-card.is-xl {
  width: min(980px, 100%);
}

.crud-modal-card .panel-head {
  position: sticky;
  top: -16px;
  z-index: 2;
  background: #fff;
  padding-right: 44px;
}

.crud-modal-card > .crud-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.crud-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #344054;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.crud-modal-close:hover {
  background: #f8fafc;
}

.action-confirm[hidden] {
  display: none;
}

.action-confirm {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100vw;
  min-width: 0;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 18px;
}

.action-confirm::backdrop {
  background: rgba(15, 23, 42, .42);
}

.action-confirm-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
}

.action-confirm-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .26);
  padding: 16px;
}

.action-confirm-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 22px;
  font-weight: 950;
}

.action-confirm-copy strong {
  display: block;
  color: #101828;
  font-size: 17px;
  font-weight: 950;
}

.action-confirm-copy p {
  margin: 5px 0 0;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.action-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.error-panel {
  border-color: #fecdd3;
  background: #fff8f8;
}

.empty-state {
  display: grid;
  gap: 7px;
  min-height: 98px;
  align-content: center;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 16px;
  color: #344054;
}

.empty-state::before {
  content: "";
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.empty-state strong {
  color: #111827;
  font-size: 15px;
}

.empty-state span {
  color: var(--muted);
}

.empty-state .primary,
.empty-state .ghost {
  width: fit-content;
  min-width: 128px;
}

body {
  --legacy-hero-a: #0f766e;
  --legacy-hero-b: #0891b2;
  --legacy-hero-c: #2563eb;
  --legacy-hero-accent: #facc15;
}

body[data-hero-theme="0"] {
  --legacy-hero-a: #0f766e;
  --legacy-hero-b: #0891b2;
  --legacy-hero-c: #2563eb;
  --legacy-hero-accent: #facc15;
}

body[data-hero-theme="1"] {
  --legacy-hero-a: #155e75;
  --legacy-hero-b: #16a34a;
  --legacy-hero-c: #65a30d;
  --legacy-hero-accent: #fde047;
}

body[data-hero-theme="2"] {
  --legacy-hero-a: #4338ca;
  --legacy-hero-b: #0ea5e9;
  --legacy-hero-c: #14b8a6;
  --legacy-hero-accent: #bfdbfe;
}

body[data-hero-theme="3"] {
  --legacy-hero-a: #7c2d12;
  --legacy-hero-b: #dc2626;
  --legacy-hero-c: #f97316;
  --legacy-hero-accent: #fed7aa;
}

body[data-hero-theme="4"] {
  --legacy-hero-a: #164e63;
  --legacy-hero-b: #2563eb;
  --legacy-hero-c: #7c3aed;
  --legacy-hero-accent: #c4b5fd;
}

body[data-hero-theme="5"] {
  --legacy-hero-a: #14532d;
  --legacy-hero-b: #059669;
  --legacy-hero-c: #0f766e;
  --legacy-hero-accent: #bbf7d0;
}

body[data-hero-theme="6"] {
  --legacy-hero-a: #581c87;
  --legacy-hero-b: #be185d;
  --legacy-hero-c: #0369a1;
  --legacy-hero-accent: #fbcfe8;
}

.legacy-page-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px !important;
  margin: 0 0 12px;
  overflow: hidden;
  padding: 13px 18px !important;
  border: 1px solid rgba(255, 255, 255, .42) !important;
  border-bottom: 3px solid var(--legacy-hero-accent) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(122deg, var(--legacy-hero-a) 0%, var(--legacy-hero-b) 48%, var(--legacy-hero-c) 100%) !important;
  background-size: 100% 100%, 190% 190% !important;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .13), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
  animation: legacyHeroFlow 14s ease-in-out infinite;
}

.legacy-page-hero::before,
.legacy-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.legacy-page-hero::before {
  background:
    repeating-linear-gradient(118deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 16px),
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .16) 42%, transparent 72%);
  opacity: .55;
  transform: translateX(-18%);
  animation: legacyHeroTexture 18s linear infinite;
}

.legacy-page-hero::after {
  width: 34%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .34) 50%, transparent 100%);
  filter: blur(1px);
  opacity: .65;
  transform: translateX(-135%) skewX(-18deg);
  animation: legacyHeroSweep 6.5s ease-in-out infinite;
}

.legacy-page-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  width: 54px !important;
  height: 54px !important;
  flex: 0 0 54px !important;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .36) !important;
  border-radius: 12px !important;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .34), transparent 42%),
    rgba(255, 255, 255, .16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 24px rgba(15, 23, 42, .16) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: legacyHeroIconPulse 4.8s ease-in-out infinite;
}

.legacy-page-hero-icon .legacy-icon,
.legacy-page-hero-icon img,
.legacy-page-hero-icon svg {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
  color: currentColor;
  filter: drop-shadow(0 4px 9px rgba(15, 23, 42, .20));
}

.legacy-page-hero-text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.legacy-page-hero-text span {
  color: rgba(255, 255, 255, .88) !important;
  font-size: 11px !important;
  font-weight: 950;
  letter-spacing: 0 !important;
  text-transform: uppercase;
}

.legacy-page-hero-text strong {
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1.05;
  font-weight: 950;
  text-shadow: 0 2px 12px rgba(15, 23, 42, .22);
}

.legacy-page-hero-text em {
  display: block !important;
  margin: 0 !important;
  max-width: 760px;
  color: rgba(240, 253, 250, .96) !important;
  font-size: 13px !important;
  font-style: normal;
  font-weight: 820;
  line-height: 1.25;
}

@keyframes legacyHeroFlow {
  0%, 100% {
    background-position: 0 0, 0% 50%;
  }
  50% {
    background-position: 0 0, 100% 50%;
  }
}

@keyframes legacyHeroTexture {
  0% {
    transform: translateX(-18%);
  }
  100% {
    transform: translateX(18%);
  }
}

@keyframes legacyHeroSweep {
  0%, 38% {
    transform: translateX(-135%) skewX(-18deg);
  }
  62%, 100% {
    transform: translateX(325%) skewX(-18deg);
  }
}

@keyframes legacyHeroIconPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 24px rgba(15, 23, 42, .16);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .30), 0 0 0 1px rgba(255, 255, 255, .12), 0 14px 30px rgba(15, 23, 42, .20);
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-page-hero,
  .legacy-page-hero::before,
  .legacy-page-hero::after,
  .legacy-page-hero-icon {
    animation: none !important;
  }

  .legacy-page-hero::after {
    opacity: 0;
  }
}

/* Shared operation surface: keeps admin, sales, HR and report pages on one visual system. */
.operation-toolbar,
.page-toolbar,
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 30, 60, .035);
  padding: 10px;
}

.operation-toolbar + .panel,
.page-toolbar + .panel,
.filter-toolbar + .panel {
  margin-top: 12px;
}

.operation-actions,
.page-actions,
.filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.panel.is-dense {
  padding: 12px;
}

.panel.is-dense .panel-head {
  margin-bottom: 10px;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section-title {
  margin: 0 0 10px;
  color: #101828;
  font-size: 16px;
  font-weight: 950;
}

.section-note {
  margin: -5px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-pill,
.badge,
.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: fit-content;
  border-radius: 999px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.status-pill {
  min-height: 24px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 9px;
  font-size: 12px;
}

.status-pill.good,
.badge.good,
.mini-badge.good {
  background: #ecfdf3;
  color: #047857;
}

.status-pill.warn,
.badge.warn,
.mini-badge.warn {
  background: #fff7ed;
  color: #c2410c;
}

.status-pill.bad,
.badge.bad,
.mini-badge.bad {
  background: #fff1f2;
  color: #be123c;
}

.badge,
.mini-badge {
  min-height: 22px;
  background: #eef2ff;
  color: #3730a3;
  padding: 0 8px;
  font-size: 11px;
}

.row-actions .table-link,
.row-actions .link-danger,
.table-link.action,
.link-danger.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 7px;
  padding: 0 8px;
  font-weight: 950;
}

.row-actions .table-link:hover,
.table-link.action:hover {
  background: #eff6ff;
}

.row-actions .link-danger:hover,
.link-danger.action:hover {
  background: #fff1f2;
}

.data-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.data-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 5px 14px rgba(20, 30, 60, .035);
  padding: 12px;
}

.data-card strong {
  color: #101828;
  font-weight: 950;
}

.data-card small,
.data-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 680px) {
  .toast-stack {
    top: auto;
    right: 10px;
    bottom: 76px;
    left: 10px;
    width: auto;
  }

  .app-toast {
    border-radius: 9px;
    font-size: 12px;
    padding: 9px 9px 9px 11px;
  }

  .action-confirm {
    align-items: end;
    padding: 12px;
  }

  .action-confirm-card {
    grid-template-columns: 38px 1fr;
    border-radius: 14px;
    padding: 14px;
  }

  .action-confirm-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 19px;
  }

  .action-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .legacy-page-hero {
    min-height: 70px !important;
    gap: 10px !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
  }

  .legacy-page-hero-icon {
    width: 44px !important;
    height: 44px !important;
    flex-basis: 44px !important;
    border-radius: 10px !important;
  }

  .legacy-page-hero-icon .legacy-icon,
  .legacy-page-hero-icon img,
  .legacy-page-hero-icon svg {
    width: 25px !important;
    height: 25px !important;
  }

  .legacy-page-hero-text {
    gap: 2px;
  }

  .legacy-page-hero-text span {
    font-size: 10px !important;
  }

  .legacy-page-hero-text strong {
    font-size: 20px !important;
  }

  .legacy-page-hero-text em {
    display: block !important;
    font-size: 11px !important;
    margin: 0 !important;
    line-height: 1.2;
  }

  .operation-toolbar,
  .page-toolbar,
  .filter-toolbar {
    align-items: stretch;
    border-radius: 10px;
  }

  .operation-actions,
  .page-actions,
  .filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .operation-actions > *,
  .page-actions > *,
  .filter-actions > * {
    width: 100%;
  }

  .data-card-grid {
    grid-template-columns: 1fr;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: initial !important;
  }
}
