:root {
  --bg: #edf2fb;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --surface-ink: #e8efff;
  --text: #132645;
  --muted: #5f7192;
  --primary: #0f46d8;
  --primary-strong: #0b3195;
  --secondary: #f59e0b;
  --danger: #c62828;
  --danger-soft: #fff3f2;
  --success-soft: #edf5ff;
  --border: #d4def2;
  --shadow-lg: 0 18px 45px rgba(15, 46, 133, 0.12);
  --shadow-md: 0 10px 24px rgba(15, 46, 133, 0.1);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 270px;
  --topbar-height: 52px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Outfit", "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(1200px 560px at 95% -10%, rgba(15, 70, 216, 0.2), transparent 55%),
    radial-gradient(980px 460px at -12% 0%, rgba(74, 132, 255, 0.14), transparent 52%),
    linear-gradient(160deg, #f7faff 0%, #eff4fe 55%, #eaf1fb 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, rgba(15, 46, 133, 0.03) 1px, transparent 1px),
    linear-gradient(45deg, rgba(15, 46, 133, 0.015) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px;
  opacity: 0.5;
  z-index: 0;
}

.with-sidebar .app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.with-sidebar .app-main {
  flex: 1;
  min-width: 0;
  padding: 82px 0 22px;
  position: relative;
}

.with-sidebar .container,
.with-sidebar .wrap {
  max-width: none;
  margin: 0;
  padding: 14px 22px 16px;
}

body.page-index .app-main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 390px;
  background: linear-gradient(180deg, #0f46d8 0%, #0b3195 100%);
  z-index: 0;
}

body.page-index .container {
  position: relative;
  z-index: 1;
}

.seller-sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: linear-gradient(180deg, #f7f9fe 0%, #eef2fb 100%);
  border-right: 1px solid #d8e1f4;
  padding: 18px 14px 20px;
  height: 100vh;
  overflow-y: auto;
  position: sticky;
  top: 0;
}

.app-topbar {
  position: fixed;
  left: calc(var(--sidebar-width) + 14px);
  right: 16px;
  top: 12px;
  z-index: 7;
  min-height: var(--topbar-height);
  border-radius: 14px;
  border: 1px solid rgba(188, 205, 239, 0.65);
  background: rgba(251, 253, 255, 0.88);
  backdrop-filter: blur(7px);
  box-shadow: 0 12px 26px rgba(15, 46, 133, 0.14);
  padding: 7px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.topbar-actions,
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-icon-btn,
.topbar-date,
.topbar-user {
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 70, 216, 0.14);
  background: #ffffff;
  color: #1d437f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.topbar-icon-btn {
  width: 36px;
}

.topbar-menu-btn {
  display: none;
}

.topbar-icon-btn:hover,
.topbar-user:hover {
  color: #0f46d8;
  border-color: rgba(15, 70, 216, 0.28);
  background: #f2f6ff;
}

.topbar-date,
.topbar-user {
  padding: 0 11px;
}

.topbar-date .ui-icon,
.topbar-user .ui-icon,
.topbar-icon-btn .ui-icon,
.brand-mark .ui-icon {
  font-size: 0.95rem;
}

.seller-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 16px;
  border-bottom: 1px solid #dee6f6;
  margin-bottom: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #2c66f0, #0f46d8);
  color: #ffffff;
  font-family: "Space Grotesk", "Outfit", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
}

.ui-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  position: relative;
}

.ui-icon::before,
.ui-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.ui-icon-home::before {
  left: 0.18em;
  right: 0.18em;
  bottom: 0.12em;
  height: 0.48em;
  border: 0.11em solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.14em 0.14em;
}

.ui-icon-home::after {
  left: 0.15em;
  top: 0.08em;
  width: 0.7em;
  height: 0.7em;
  border-left: 0.11em solid currentColor;
  border-top: 0.11em solid currentColor;
  transform: rotate(45deg);
}

.ui-icon-box::before {
  inset: 0.15em;
  border: 0.11em solid currentColor;
  border-radius: 0.12em;
}

.ui-icon-box::after {
  left: 0.18em;
  right: 0.18em;
  top: 0.45em;
  border-top: 0.11em solid currentColor;
}

.ui-icon-receipt::before {
  left: 0.24em;
  right: 0.24em;
  top: 0.12em;
  bottom: 0.12em;
  border: 0.11em solid currentColor;
  border-radius: 0.09em;
}

.ui-icon-receipt::after {
  left: 0.34em;
  right: 0.34em;
  top: 0.35em;
  border-top: 0.11em solid currentColor;
  box-shadow: 0 0.18em 0 0 currentColor;
}

.ui-icon-chart::before {
  left: 0.16em;
  bottom: 0.14em;
  width: 0.68em;
  height: 0.56em;
  border-left: 0.11em solid currentColor;
  border-bottom: 0.11em solid currentColor;
}

.ui-icon-chart::after {
  left: 0.3em;
  top: 0.28em;
  width: 0.44em;
  height: 0.3em;
  border-left: 0.11em solid currentColor;
  border-bottom: 0.11em solid currentColor;
  transform: skewX(-20deg) rotate(-20deg);
}

.ui-icon-users::before {
  left: 0.12em;
  top: 0.18em;
  width: 0.32em;
  height: 0.32em;
  border: 0.11em solid currentColor;
  border-radius: 999px;
  box-shadow: 0.34em 0 0 -0.01em currentColor;
}

.ui-icon-users::after {
  left: 0.14em;
  bottom: 0.12em;
  width: 0.66em;
  height: 0.24em;
  border: 0.11em solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.3em 0.3em;
}

.ui-icon-plug::before {
  left: 0.36em;
  top: 0.12em;
  width: 0.24em;
  height: 0.5em;
  border: 0.11em solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.12em 0.12em;
}

.ui-icon-plug::after {
  left: 0.26em;
  top: 0.02em;
  width: 0.44em;
  height: 0.14em;
  border-left: 0.11em solid currentColor;
  border-right: 0.11em solid currentColor;
}

.ui-icon-grid::before {
  left: 0.14em;
  top: 0.14em;
  width: 0.26em;
  height: 0.26em;
  border: 0.11em solid currentColor;
  border-radius: 0.08em;
  box-shadow: 0.36em 0 0 -0.01em currentColor, 0 0.36em 0 -0.01em currentColor, 0.36em 0.36em 0 -0.01em currentColor;
}

.ui-icon-calendar::before {
  inset: 0.14em;
  border: 0.11em solid currentColor;
  border-radius: 0.12em;
}

.ui-icon-calendar::after {
  left: 0.14em;
  right: 0.14em;
  top: 0.34em;
  border-top: 0.11em solid currentColor;
}

.ui-icon-sync::before {
  left: 0.18em;
  top: 0.18em;
  width: 0.56em;
  height: 0.56em;
  border: 0.11em solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
}

.ui-icon-sync::after {
  right: 0.12em;
  top: 0.12em;
  width: 0;
  height: 0;
  border-top: 0.18em solid transparent;
  border-bottom: 0.18em solid transparent;
  border-left: 0.2em solid currentColor;
}

.ui-icon-settings::before {
  left: 0.24em;
  top: 0.24em;
  width: 0.52em;
  height: 0.52em;
  border: 0.11em solid currentColor;
  border-radius: 999px;
}

.ui-icon-settings::after {
  left: 0.06em;
  right: 0.06em;
  top: 0.46em;
  border-top: 0.11em solid currentColor;
  box-shadow: 0 -0.28em 0 0 currentColor;
}

.ui-icon-user::before {
  left: 0.28em;
  top: 0.14em;
  width: 0.34em;
  height: 0.34em;
  border: 0.11em solid currentColor;
  border-radius: 999px;
}

.ui-icon-user::after {
  left: 0.18em;
  bottom: 0.12em;
  width: 0.54em;
  height: 0.26em;
  border: 0.11em solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.3em 0.3em;
}

.ui-icon-menu::before {
  left: 0.16em;
  right: 0.16em;
  top: 0.24em;
  border-top: 0.11em solid currentColor;
  box-shadow: 0 0.22em 0 0 currentColor, 0 0.44em 0 0 currentColor;
}

.ui-icon-close::before,
.ui-icon-close::after {
  left: 0.48em;
  top: 0.18em;
  bottom: 0.18em;
  border-left: 0.11em solid currentColor;
}

.ui-icon-close::before {
  transform: rotate(45deg);
}

.ui-icon-close::after {
  transform: rotate(-45deg);
}

.brand-text strong,
.brand-text span {
  display: block;
  line-height: 1;
  font-family: "Space Grotesk", "Outfit", sans-serif;
  color: #123fbd;
}

.brand-text strong {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.brand-text span {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-user {
  margin: 0 8px 12px;
  border: 1px solid #dbe4f5;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-user strong {
  color: #233c66;
  font-size: 0.88rem;
}

.sidebar-user span {
  color: #5b7090;
  font-size: 0.78rem;
  word-break: break-all;
}

.sidebar-user a {
  margin-top: 4px;
  color: #0f46d8;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.sidebar-user a:hover {
  color: #0b3195;
}

.sidebar-close-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(15, 70, 216, 0.22);
  border-radius: 10px;
  background: #f6f9ff;
  color: #365f9a;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.sidebar-close-btn:hover {
  background: #e9f0ff;
  transform: none;
}

.menu-tools {
  margin: 0 8px 12px;
  padding: 10px;
  border: 1px solid #dbe4f5;
  border-radius: 12px;
  background: #ffffff;
}

.menu-search-label {
  margin-bottom: 7px;
  color: #4f6381;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.menu-search-input {
  height: 38px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.menu-search-empty {
  margin: 8px 0 0;
  color: #5d7192;
  font-size: 0.78rem;
}

.seller-menu {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.menu-section {
  background: transparent;
  border-radius: 16px;
}

.menu-section summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  color: #5f7191;
  font-size: 0.98rem;
  font-weight: 700;
  position: relative;
}

.menu-section summary:focus-visible {
  outline: 2px solid rgba(15, 70, 216, 0.32);
  outline-offset: 2px;
}

.menu-section summary::-webkit-details-marker {
  display: none;
}

.menu-section summary::after {
  content: "^";
  margin-left: auto;
  font-size: 0.82rem;
  color: #8ea2c7;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.menu-section[open] summary::after {
  transform: rotate(0deg);
}

.menu-section.active summary {
  background: #e9efff;
  color: #0f46d8;
}

.menu-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  position: relative;
  color: #8ea2c7;
  background: #e2e9fa;
}

.menu-icon::before,
.menu-icon::after {
  color: inherit;
}

.menu-section.active .menu-icon {
  color: #ffffff;
  background: linear-gradient(140deg, #2c66f0, #0f46d8);
}

.menu-icon--home::before,
.menu-icon--home::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.menu-icon--home::before {
  left: 0.32em;
  right: 0.32em;
  bottom: 0.24em;
  height: 0.46em;
  border: 0.1em solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.12em 0.12em;
}

.menu-icon--home::after {
  left: 0.28em;
  top: 0.16em;
  width: 0.46em;
  height: 0.46em;
  border-left: 0.1em solid currentColor;
  border-top: 0.1em solid currentColor;
  transform: rotate(45deg);
}

.menu-icon--box::before,
.menu-icon--box::after,
.menu-icon--receipt::before,
.menu-icon--receipt::after,
.menu-icon--chart::before,
.menu-icon--chart::after,
.menu-icon--users::before,
.menu-icon--users::after,
.menu-icon--plug::before,
.menu-icon--plug::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.menu-icon--box::before {
  inset: 0.23em;
  border: 0.1em solid currentColor;
  border-radius: 0.1em;
}

.menu-icon--box::after {
  left: 0.26em;
  right: 0.26em;
  top: 0.5em;
  border-top: 0.1em solid currentColor;
}

.menu-icon--receipt::before {
  left: 0.28em;
  right: 0.28em;
  top: 0.18em;
  bottom: 0.18em;
  border: 0.1em solid currentColor;
  border-radius: 0.08em;
}

.menu-icon--receipt::after {
  left: 0.37em;
  right: 0.37em;
  top: 0.4em;
  border-top: 0.1em solid currentColor;
  box-shadow: 0 0.18em 0 0 currentColor;
}

.menu-icon--chart::before {
  left: 0.22em;
  bottom: 0.22em;
  width: 0.56em;
  height: 0.44em;
  border-left: 0.1em solid currentColor;
  border-bottom: 0.1em solid currentColor;
}

.menu-icon--chart::after {
  left: 0.38em;
  top: 0.38em;
  width: 0.34em;
  height: 0.24em;
  border-left: 0.1em solid currentColor;
  border-bottom: 0.1em solid currentColor;
  transform: skewX(-18deg) rotate(-18deg);
}

.menu-icon--users::before {
  left: 0.2em;
  top: 0.24em;
  width: 0.24em;
  height: 0.24em;
  border: 0.1em solid currentColor;
  border-radius: 999px;
  box-shadow: 0.26em 0 0 -0.01em currentColor;
}

.menu-icon--users::after {
  left: 0.2em;
  bottom: 0.16em;
  width: 0.5em;
  height: 0.2em;
  border: 0.1em solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.24em 0.24em;
}

.menu-icon--plug::before {
  left: 0.34em;
  top: 0.16em;
  width: 0.2em;
  height: 0.42em;
  border: 0.1em solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.08em 0.08em;
}

.menu-icon--plug::after {
  left: 0.26em;
  top: 0.06em;
  width: 0.36em;
  height: 0.12em;
  border-left: 0.1em solid currentColor;
  border-right: 0.1em solid currentColor;
}

.submenu {
  padding: 4px 4px 8px 42px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.submenu-link {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #4e617f;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.submenu-label {
  display: block;
}

.submenu-link:hover {
  background: #edf2ff;
  color: #27467f;
}

.submenu-link.active {
  background: #e2eaff;
  color: #0f46d8;
  font-weight: 800;
}

.submenu-link.is-match:not(.active) {
  background: #f1f6ff;
  color: #1b4888;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

.container,
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 16px auto 28px;
  padding: 0 18px;
}

.wrap {
  max-width: 1080px;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", "Outfit", sans-serif;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.04rem;
}

.meta {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

body.page-index .dashboard-hero {
  border-radius: 22px;
  padding: 18px 18px 16px;
  margin-bottom: 12px;
  background: linear-gradient(145deg, rgba(18, 73, 209, 0.92), rgba(10, 43, 133, 0.92));
  border: 1px solid rgba(158, 185, 255, 0.35);
  box-shadow: 0 18px 40px rgba(8, 33, 105, 0.28);
}

body.page-index .dashboard-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

body.page-index .dashboard-kicker {
  margin: 0 0 6px;
  color: rgba(232, 241, 255, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
}

body.page-index .dashboard-headline h1 {
  color: #ffffff;
  margin: 0;
}

body.page-index .dashboard-date-badge {
  border-radius: 999px;
  border: 1px solid rgba(228, 239, 255, 0.42);
  background: rgba(228, 239, 255, 0.2);
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 8px 14px;
  white-space: nowrap;
}

body.page-index .dashboard-hero .meta {
  color: rgba(238, 244, 255, 0.95);
  margin: 8px 0 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(15, 70, 216, 0.24);
  background: rgba(255, 255, 255, 0.75);
  color: var(--primary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.2s ease;
  backdrop-filter: blur(2px);
}

.links a:hover {
  transform: translateY(-1px);
  background: rgba(15, 70, 216, 0.09);
  border-color: rgba(15, 70, 216, 0.35);
}

.links a.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #245de3 48%, #0f46d8 100%);
  border-color: rgba(15, 70, 216, 0.72);
  box-shadow: 0 10px 20px rgba(15, 70, 216, 0.22);
}

.flash {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 0 0 14px;
  border: 1px solid rgba(15, 70, 216, 0.28);
  background: linear-gradient(145deg, var(--success-soft), #f9fbff);
  color: #16408f;
  box-shadow: var(--shadow-md);
}

.flash.error {
  border-color: rgba(180, 35, 24, 0.26);
  background: linear-gradient(145deg, var(--danger-soft), #fff8f7);
  color: var(--danger);
}

.controls,
.filter-card,
.panel,
.table-wrap,
.wrap > .card {
  border: 1px solid rgba(212, 222, 242, 0.88);
  border-radius: var(--radius-lg);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.97), rgba(246, 250, 255, 0.95));
  box-shadow: var(--shadow-lg);
}

.controls,
.filter-card,
.panel,
.table-wrap,
.wrap > .card,
.cards .card,
.import,
.oauth-panel {
  animation: riseIn 0.46s ease both;
}

.controls {
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.controls a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 70, 216, 0.08);
  border: 1px solid rgba(15, 70, 216, 0.12);
}

.controls a:hover {
  background: rgba(15, 70, 216, 0.15);
}

body.page-index .controls.dashboard-controls {
  padding: 10px;
}

.table-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.table-head h3 {
  margin: 0;
}

.table-search {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.page-products-inventory .controls .chip-group {
  flex: 1 1 100%;
}

body.page-products-inventory .table-search input[type="text"] {
  width: 360px;
  max-width: 100%;
}

body.page-products-inventory .table-search button,
body.page-products-inventory .table-search .link-btn {
  width: auto;
  white-space: nowrap;
}

.controls .chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.controls .chip-group a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 70, 216, 0.08);
  border: 1px solid rgba(15, 70, 216, 0.15);
}

.controls .chip-group a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #245de3 48%, #0f46d8 100%);
  box-shadow: 0 8px 18px rgba(15, 70, 216, 0.22);
}

.controls .toolbar-form {
  margin: 0;
  border: 1px solid rgba(15, 70, 216, 0.14);
  border-radius: 14px;
  background: linear-gradient(165deg, #ffffff, #f7fffc);
  padding: 9px;
  box-shadow: 0 6px 16px rgba(15, 70, 216, 0.08);
  flex: 1 1 460px;
  display: grid;
  gap: 8px;
}

.controls .toolbar-form .inline-field {
  min-width: 0;
}

.controls .toolbar-form .inline-field label {
  margin-bottom: 4px;
}

.controls .toolbar-form .inline-action {
  display: flex;
  align-items: flex-end;
}

.controls .toolbar-form .inline-action .sync-btn,
.controls .toolbar-form .inline-action button {
  width: 100%;
}

.controls .toolbar-form.toolbar-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.controls .toolbar-form.toolbar-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.controls .toolbar-form.toolbar-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.controls .toolbar-form.toolbar-2-tight {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.controls .toolbar-form.toolbar-1 {
  grid-template-columns: 1fr;
}

.controls .toolbar-form.toolbar-auto {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: end;
}

.controls .toolbar-form.toolbar-compact {
  flex: 0 1 560px;
}

.controls .actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.controls .actions-inline a {
  font-weight: 700;
}

body.page-index .dashboard-controls {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

body.page-index .dashboard-controls .sync-card {
  border: 1px solid rgba(15, 70, 216, 0.16);
  border-radius: 16px;
  background: linear-gradient(165deg, #ffffff, #f5f9ff);
  box-shadow: var(--shadow-md);
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.page-index .dashboard-controls .quick-sync-card {
  grid-column: span 12;
}

body.page-index .dashboard-controls .range-sync-card {
  grid-column: span 8;
}

body.page-index .dashboard-controls .inventory-sync-card {
  grid-column: span 4;
}

body.page-index .dashboard-controls .card-head h2 {
  margin: 0;
  color: #18396c;
  font-size: 1rem;
}

body.page-index .dashboard-controls .card-head p {
  margin: 4px 0 0;
  color: #60759a;
  font-size: 0.82rem;
}

body.page-index .quick-sync-row {
  display: grid;
  grid-template-columns: minmax(200px, auto) minmax(320px, 1fr) auto;
  align-items: end;
  gap: 8px;
}

body.page-index .day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.page-index .day-chips a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 70, 216, 0.08);
  border: 1px solid rgba(15, 70, 216, 0.15);
}

body.page-index .day-chips a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #245de3 48%, #0f46d8 100%);
  box-shadow: 0 10px 20px rgba(15, 70, 216, 0.24);
}

body.page-index .custom-days-input {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

body.page-index .custom-days-input .days-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: rgba(15, 70, 216, 0.08);
  border: 1px solid rgba(15, 70, 216, 0.15);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

body.page-index .custom-days-input .days-btn:hover {
  background: rgba(15, 70, 216, 0.15);
  transform: translateY(-1px);
}

body.page-index .custom-days-input input {
  width: 70px;
  padding: 6px 8px;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 8px;
  border: 1px solid rgba(15, 70, 216, 0.2);
  background: #ffffff;
  color: var(--text);
}

body.page-index .custom-days-input input:focus {
  outline: none;
  border-color: rgba(15, 70, 216, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 70, 216, 0.1);
}

body.page-index .custom-days-input .days-btn-apply {
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #245de3 48%, #0f46d8 100%);
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.page-index .custom-days-input .days-btn-apply:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

body.page-index .inventory-days-input {
  display: flex;
  align-items: center;
  gap: 4px;
}

body.page-index .inventory-days-input .days-btn-small {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: rgba(15, 70, 216, 0.08);
  border: 1px solid rgba(15, 70, 216, 0.15);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

body.page-index .inventory-days-input .days-btn-small:hover {
  background: rgba(15, 70, 216, 0.15);
  transform: translateY(-1px);
}

body.page-index .inventory-days-input select {
  min-width: 90px;
}

body.page-index .inventory-days-input input {
  width: 70px;
  padding: 6px 8px;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 6px;
  border: 1px solid rgba(15, 70, 216, 0.2);
  background: #ffffff;
  color: var(--text);
}

body.page-index .inventory-days-input input:focus {
  outline: none;
  border-color: rgba(15, 70, 216, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 70, 216, 0.1);
}

body.page-index .sync-orders-form {
  margin-left: 0;
  min-width: 180px;
  justify-self: end;
}

body.page-index .quick-sync-row .toolbar-form {
  min-width: 0;
}

body.page-index .queue-status-cards,
body.page-sync-tasks .queue-status-cards {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.queue-table .queue-message {
  white-space: normal;
  min-width: 320px;
}

.queue-table tr.row-focus td {
  background: rgba(15, 70, 216, 0.12);
}

.queue-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
}

.queue-status-badge.pending {
  background: #fff8eb;
  border-color: #ffd18d;
  color: #8e5600;
}

.queue-status-badge.completed {
  background: #edfbf4;
  border-color: #9fdfbf;
  color: #0b6a47;
}

.queue-status-badge.failed {
  background: #fff0ee;
  border-color: #f1b1ab;
  color: #b42318;
}

.queue-status-badge.cancelled {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.queue-status-badge.paused {
  background: #fefce8;
  border-color: #fef08a;
  color: #854d0e;
}

.queue-status-badge.warning {
  background: #fff8eb;
  border-color: #ffd18d;
  color: #7a4300;
}

/* Queue Actions */
.queue-actions {
  white-space: nowrap;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.queue-actions .btn-action {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 50px;
  text-align: center;
  margin: 2px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.queue-actions .btn-action:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}

.queue-actions .btn-cancel {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.queue-actions .btn-cancel:hover {
  background: #fee2e2;
}

.queue-actions .btn-pause {
  background: #fefce8;
  border-color: #fef08a;
  color: #a16207;
}

.queue-actions .btn-pause:hover {
  background: #fef9c3;
}

.queue-actions .btn-restart {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.queue-actions .btn-restart:hover {
  background: #dbeafe;
}

.queue-actions .btn-delete {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.queue-actions .btn-delete:hover {
  background: #fee2e2;
}

body.page-index .range-sync-form {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

body.page-index .range-sync-form .field-group {
  min-width: 0;
}

body.page-index .range-sync-form .order-input {
  min-width: 0;
}

body.page-index .range-sync-form .range-submit {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
}

body.page-index .inventory-sync-form {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  white-space: normal;
}

body.page-index .inventory-sync-form .inline-field {
  min-width: 0;
}

body.page-index .inventory-sync-form select {
  width: 100%;
  min-width: 0;
}

body.page-index .inventory-sync-form .inline-action {
  grid-column: 1 / -1;
}

body.page-index .inventory-sync-form .inline-action .sync-btn {
  width: 100%;
}

.control-label-inline {
  color: #5a697e;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sync-inline {
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
}

.sync-inline select {
  width: auto;
  min-width: 92px;
  padding-right: 28px;
}

.sync-inline .control-label-inline {
  margin-right: -2px;
}

.sync-form,
.order-form,
.range-form,
.alert-form,
.oauth-form,
.inline-form,
.import form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filters {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  align-items: end;
}

.filter-card,
.panel,
.table-wrap,
.wrap > .card {
  padding: 12px;
  margin-bottom: 12px;
}

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

body.page-index .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-config .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

body.page-index .cards {
  grid-template-columns: repeat(4, minmax(205px, 1fr));
  gap: 12px;
}

.cards .card {
  border: 1px solid rgba(15, 70, 216, 0.14);
  border-radius: 16px;
  padding: 14px 14px 13px;
  background: linear-gradient(168deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 12px 24px rgba(18, 52, 118, 0.08);
  position: relative;
  overflow: hidden;
  min-height: 122px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cards .card.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0f46d8, #3f85ff);
  opacity: 0.88;
}

.cards .card.metric-card.card--good::before {
  background: linear-gradient(90deg, #1f8f68, #30b87f);
}

.cards .card.metric-card.card--bad::before {
  background: linear-gradient(90deg, #cb354f, #f06b5f);
}

.cards .card.metric-card.card--product::before {
  background: linear-gradient(90deg, #7956d5, #9a73eb);
}

.cards .card.metric-card.card--featured {
  background: linear-gradient(160deg, #ffffff 0%, #f0f6ff 58%, #eef4ff 100%);
  border-color: rgba(63, 133, 255, 0.32);
}

.cards .card.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(18, 52, 118, 0.12);
  border-color: rgba(15, 70, 216, 0.26);
}

.cards .card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.28) 42%, transparent 70%);
  transform: translateX(-140%);
  transition: transform 0.6s ease;
}

.cards .card:hover::after {
  transform: translateX(110%);
}

.card h2,
.card h3 {
  color: #5f7396;
  font-size: 0.76rem;
  text-transform: none;
  letter-spacing: 0.04em;
  font-weight: 800;
  margin: 0;
}

.value {
  margin-top: 9px;
  font-size: clamp(1.28rem, 2vw, 1.95rem);
  font-weight: 800;
  line-height: 1.1;
  color: #133364;
  font-family: "Space Grotesk", "Outfit", sans-serif;
}

.value .metric-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  border-bottom: 1px dashed rgba(19, 51, 100, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.value .metric-link:hover {
  color: #0f46d8;
  border-bottom-color: rgba(15, 70, 216, 0.7);
}

.value.ok .metric-link,
.value.fail .metric-link {
  color: inherit;
}

.value.ok {
  color: #17795a;
}

.value.fail {
  color: #c33c52;
}

.cards .card.metric-card.card--amount .value {
  font-size: clamp(1.2rem, 1.55vw, 1.66rem);
}

.cards .card.metric-card.card--product .value {
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.35;
  font-family: "Outfit", sans-serif;
}

.cards .card .hint {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #6a7f9f;
  line-height: 1.42;
  font-weight: 500;
}

body.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
}

.auth-shell {
  width: min(100%, 460px);
  border: 1px solid rgba(212, 222, 242, 0.9);
  border-radius: 24px;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92));
  box-shadow: var(--shadow-lg);
  padding: 22px 20px;
  position: relative;
  z-index: 1;
}

.auth-shell h1 {
  margin-bottom: 8px;
}

.auth-meta {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 0.9rem;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form .actions {
  margin-top: 2px;
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: rgba(236, 242, 255, 0.9);
  color: #113fbe;
  border: 1px solid rgba(15, 70, 216, 0.22);
  box-shadow: none;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.password-toggle:hover {
  filter: none;
  transform: translateY(-50%);
  background: rgba(220, 232, 255, 0.96);
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 70, 216, 0.14);
}

.auth-link {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.import {
  border: 1px solid rgba(15, 70, 216, 0.2);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(160deg, #ffffff, #f5f9ff);
  box-shadow: var(--shadow-md);
}

.import p,
.hint,
.code-line,
.pager {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #4d6078;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.field {
  margin-bottom: 10px;
}

input,
select,
button,
.link-btn,
.btn,
.sync-btn {
  font-family: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(168, 185, 224, 0.95);
  background: #ffffff;
  color: #10253f;
  padding: 10px 11px;
  font-size: 0.88rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 70, 216, 0.58);
  box-shadow: 0 0 0 4px rgba(15, 70, 216, 0.14);
}

.order-input {
  min-width: 190px;
}

button,
.sync-btn,
.btn,
.link-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button,
.sync-btn,
.btn {
  background: linear-gradient(135deg, var(--primary), #245de3 48%, #0f46d8 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 70, 216, 0.28);
}

button:hover,
.sync-btn:hover,
.btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.link-btn {
  background: linear-gradient(135deg, #ecf2ff, #dce8ff);
  color: #113fbe;
  text-decoration: none;
  border: 1px solid rgba(15, 70, 216, 0.24);
  box-shadow: 0 8px 16px rgba(15, 70, 216, 0.16);
}

.topbar-actions .topbar-menu-btn {
  border: 1px solid rgba(15, 70, 216, 0.14);
  border-radius: 10px;
  background: #ffffff;
  color: #1d437f;
  box-shadow: none;
  padding: 0 12px;
  width: auto;
  height: 36px;
  font-size: 0.8rem;
  font-weight: 700;
}

.topbar-actions .topbar-menu-btn:hover {
  background: #f2f6ff;
  color: #0f46d8;
  border-color: rgba(15, 70, 216, 0.28);
  transform: none;
  filter: none;
}

.seller-brand .sidebar-close-btn {
  border: 1px solid rgba(15, 70, 216, 0.22);
  border-radius: 10px;
  background: #f6f9ff;
  color: #365f9a;
  box-shadow: none;
  padding: 0;
}

.seller-brand .sidebar-close-btn:hover {
  background: #e9f0ff;
  color: #1f4b8b;
  transform: none;
  filter: none;
}

body .sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 14;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(8, 20, 45, 0.52);
  color: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body .sidebar-overlay:hover {
  transform: none;
  filter: none;
}

.actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.oauth-panel {
  margin-top: 14px;
  border: 1px solid rgba(15, 70, 216, 0.2);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(237, 244, 255, 0.88), rgba(255, 255, 255, 0.95));
}

.oauth-panel h2 {
  font-size: 1rem;
}

.oauth-form .field {
  margin: 0;
  min-width: 220px;
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
}

.table-wrap h3 {
  margin-bottom: 10px;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
}

th,
td {
  text-align: left;
  padding: 10px 11px;
  border-bottom: 1px solid rgba(212, 222, 242, 0.9);
  white-space: nowrap;
}

table.kv-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

table.kv-table th {
  white-space: nowrap;
}

th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #56667c;
  background: #eff4ff;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: rgba(15, 70, 216, 0.05);
}

body.page-products-sales .table-wrap th:first-child,
body.page-products-sales .table-wrap td:first-child,
body.page-products-economics .table-wrap th:first-child,
body.page-products-economics .table-wrap td:first-child {
  position: sticky;
  left: 0;
}

body.page-products-sales .table-wrap td:first-child,
body.page-products-economics .table-wrap td:first-child {
  background: #f9fbff;
  z-index: 2;
}

body.page-products-sales .table-wrap th:first-child,
body.page-products-economics .table-wrap th:first-child {
  z-index: 3;
}

body.page-products-sales .table-wrap td:first-child,
body.page-products-sales .table-wrap td:nth-child(2),
body.page-products-economics .table-wrap td:first-child,
body.page-products-economics .table-wrap td:nth-child(2) {
  white-space: normal;
}

body.page-products-sales .table-wrap td:first-child,
body.page-products-economics .table-wrap td:first-child {
  min-width: 180px;
  overflow-wrap: anywhere;
}

body.page-products-sales .table-wrap td:nth-child(2),
body.page-products-economics .table-wrap td:nth-child(2) {
  min-width: 250px;
}

a {
  color: #0f46d8;
}

a:hover {
  color: #0b3195;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.83em;
  padding: 2px 6px;
  border-radius: 8px;
  background: #edf3ff;
  color: #173870;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

.inline-form {
  min-width: 420px;
}

.inline-form input {
  min-width: 130px;
  padding: 7px 8px;
  font-size: 0.8rem;
}

body.page-config .wrap > .card {
  border-radius: 24px;
  padding: 18px;
}

body.page-config .meta {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(212, 222, 242, 0.9);
  border-radius: 14px;
  padding: 10px 12px;
}

body.page-mappings .panel .grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.page-mappings .table-wrap th:last-child,
body.page-mappings .table-wrap td:last-child {
  position: sticky;
  right: 0;
}

body.page-mappings .table-wrap th:last-child {
  z-index: 3;
  background: #eff4ff;
}

body.page-mappings .table-wrap td:last-child {
  z-index: 2;
  background: #f9fbff;
  box-shadow: -14px 0 18px rgba(15, 70, 216, 0.08);
}

body.page-mappings .table-wrap td:nth-child(1) {
  max-width: 180px;
  overflow-wrap: anywhere;
}

body.page-mappings .table-wrap td:nth-child(4) {
  white-space: normal;
  max-width: 420px;
  overflow-wrap: anywhere;
}

body.page-mappings .mapping-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 340px;
}

body.page-mappings .mapping-form input {
  min-width: 120px;
  width: 150px;
  padding: 7px 8px;
  font-size: 0.8rem;
}

body.page-mappings .mapping-form input[name="ultimatepos_sku"] {
  width: 130px;
}

body.page-mappings .mapping-form .btn {
  white-space: nowrap;
}

body.page-mappings .btn.btn-secondary {
  background: rgba(15, 70, 216, 0.08);
  border: 1px solid rgba(15, 70, 216, 0.14);
  color: #0f46d8;
  box-shadow: none;
}

body.page-mappings .btn.btn-secondary:hover {
  background: rgba(15, 70, 216, 0.12);
}

body.page-mappings .mapping-form details {
  flex-basis: 100%;
}

body.page-mappings .mapping-form details summary {
  cursor: pointer;
  color: #46607a;
  font-size: 0.78rem;
  user-select: none;
}

body.page-mappings .mapping-form .more-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

body.page-index .header,
body.page-orders .header,
body.page-profit .header,
body.page-sync-tasks .header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .with-sidebar .app-shell {
    display: block;
  }

  .app-topbar {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    margin: 0 14px 10px;
    width: auto;
  }

  .with-sidebar .app-main {
    padding-top: 12px;
  }

  .topbar-menu-btn {
    display: inline-flex;
  }

  .sidebar-close-btn {
    display: inline-flex;
  }

  .seller-sidebar {
    width: min(330px, 88vw);
    height: 100vh;
    max-height: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 15;
    border-right: 1px solid #d8e1f4;
    border-bottom: 0;
    border-radius: 0;
    margin: 0;
    box-shadow: 0 18px 48px rgba(13, 33, 78, 0.33);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overscroll-behavior: contain;
  }

  body.menu-open .seller-sidebar {
    transform: translateX(0);
  }

  .with-sidebar .container,
  .with-sidebar .wrap {
    padding: 6px 14px 10px;
  }

  body.page-index .app-main::before {
    height: 320px;
  }

  body.page-index .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-config .grid,
  body.page-index .grid {
    grid-template-columns: 1fr;
  }

  body.page-index .dashboard-controls {
    grid-template-columns: 1fr;
  }

  body.page-index .dashboard-controls .quick-sync-card,
  body.page-index .dashboard-controls .range-sync-card,
  body.page-index .dashboard-controls .inventory-sync-card {
    grid-column: 1;
  }

  body.page-index .queue-status-cards,
  body.page-sync-tasks .queue-status-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-form {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .container,
  .wrap {
    margin-top: 18px;
    padding: 0 12px;
  }

  .app-topbar {
    margin: 0 12px 8px;
    padding: 8px;
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .topbar-actions,
  .topbar-meta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  body.page-index .dashboard-headline {
    flex-direction: column;
    align-items: flex-start;
  }

  body.page-index .dashboard-date-badge {
    align-self: flex-start;
  }

  .controls {
    padding: 10px;
  }

  .controls a,
  .links a {
    width: auto;
  }

  .seller-sidebar {
    padding: 12px 10px 14px;
  }

  .brand-text strong {
    font-size: 1.35rem;
  }

  .submenu {
    padding-left: 30px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .sync-form,
  .order-form,
  .range-form,
  .alert-form,
  .import form,
  .actions,
  .oauth-form {
    width: 100%;
  }

  .sync-form input,
  .alert-form input,
  .order-input,
  .inline-form input {
    width: 100%;
    min-width: 0;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .sync-inline {
    flex-wrap: wrap;
    white-space: normal;
  }

  .sync-inline select {
    width: 100%;
    min-width: 0;
  }

  .controls .toolbar-form,
  .controls .toolbar-form.toolbar-4,
  .controls .toolbar-form.toolbar-3,
  .controls .toolbar-form.toolbar-2,
  .controls .toolbar-form.toolbar-2-tight,
  .controls .toolbar-form.toolbar-auto {
    grid-template-columns: 1fr;
    flex-basis: 100%;
  }

  .controls .toolbar-form .inline-action .sync-btn,
  .controls .toolbar-form .inline-action button {
    width: 100%;
  }

  body.page-index .quick-sync-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.page-index .sync-orders-form {
    min-width: 0;
    width: 100%;
    justify-self: stretch;
  }

  body.page-index .sync-orders-form .sync-btn {
    width: 100%;
  }

  body.page-index .queue-status-cards,
  body.page-sync-tasks .queue-status-cards {
    grid-template-columns: 1fr;
  }

  body.page-index .range-sync-form,
  body.page-index .inventory-sync-form {
    grid-template-columns: 1fr;
  }

  .cards {
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
