:root {
  --blue-950: #061b46;
  --blue-900: #08265e;
  --blue-800: #0b3d91;
  --blue-700: #0f5dde;
  --blue-100: #eaf2ff;
  --sky-100: #dff6ff;
  --green: #10b981;
  --green-soft: #dff8ec;
  --amber: #f59e0b;
  --amber-soft: #fff3d2;
  --red: #ef4444;
  --red-soft: #ffe1e1;
  --violet: #7c3aed;
  --violet-soft: #eee6ff;
  --ink: #10203f;
  --muted: #65718a;
  --line: #dfe7f3;
  --paper: #ffffff;
  --canvas: #f4f8fd;
  --shadow: 0 18px 40px rgba(8, 38, 94, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.18), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, var(--canvas) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  color: #fff;
  background: linear-gradient(180deg, var(--blue-900), var(--blue-950));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.brand img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: 0;
}

.brand span,
.user-card span,
.page-note,
.mini,
.muted {
  color: var(--muted);
}

.brand span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  background: #1267f1;
  color: #fff;
}

.ico {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.ico::before,
.ico::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

[data-icon="dashboard"]::after { inset: 7px 3px 3px 9px; background: currentColor; border: 0; }
[data-icon="store"]::before { border-radius: 2px; transform: skew(-8deg); }
[data-icon="store"]::after { inset: 9px 5px 3px; border-top: 0; }
[data-icon="box"]::after { inset: 5px; transform: rotate(45deg); border-radius: 2px; }
[data-icon="cart"]::before { inset: 4px 3px 7px; border-top: 0; }
[data-icon="cart"]::after { inset: auto 3px 2px 4px; height: 3px; border: 0; background: currentColor; box-shadow: 10px 0 0 currentColor; border-radius: 50%; }
[data-icon="card"]::before { inset: 4px 2px; }
[data-icon="card"]::after { inset: 8px 2px auto; height: 2px; border: 0; background: currentColor; }
[data-icon="wallet"]::before { inset: 4px 3px; }
[data-icon="wallet"]::after { inset: 8px 2px 6px 11px; background: currentColor; border: 0; border-radius: 50%; }
[data-icon="truck"]::before { inset: 5px 6px 7px 2px; }
[data-icon="truck"]::after { inset: auto 2px 2px 4px; height: 4px; border: 0; background: currentColor; box-shadow: 9px 0 0 currentColor; border-radius: 50%; }
[data-icon="chart"]::before { inset: 3px 4px; border-top: 0; border-right: 0; }
[data-icon="chart"]::after { inset: 5px 2px 4px 6px; border: 0; border-radius: 0; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: skew(-25deg); }
[data-icon="user"]::before { inset: 2px 5px 8px; border-radius: 50%; }
[data-icon="user"]::after { inset: 10px 3px 2px; border-radius: 8px 8px 3px 3px; }
[data-icon="audit"]::before { inset: 2px 4px; border-radius: 3px; }
[data-icon="audit"]::after { inset: 7px 7px auto 7px; height: 2px; border: 0; background: currentColor; box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor; border-radius: 99px; }
[data-icon="gear"]::before { border-radius: 50%; }
[data-icon="gear"]::after { inset: 7px; border-radius: 50%; background: currentColor; }
[data-icon="search"]::before { inset: 2px 5px 5px 2px; border-radius: 50%; }
[data-icon="search"]::after { inset: auto 1px 2px auto; width: 7px; height: 2px; border: 0; background: currentColor; transform: rotate(45deg); transform-origin: center; }
[data-icon="bell"]::before { inset: 3px 4px 5px; border-bottom: 0; border-radius: 8px 8px 3px 3px; }
[data-icon="bell"]::after { inset: auto 6px 2px; height: 2px; border: 0; background: currentColor; }

.user-card {
  width: 100%;
  margin-top: auto;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
}

.user-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue-900);
  background: #fff;
  font-weight: 900;
}

img.avatar {
  object-fit: cover;
}

.user-card strong {
  display: block;
  font-size: 14px;
}

.user-card span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 112px;
  padding: 26px 32px 22px;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 4;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--blue-700);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 2.1vw, 36px);
  line-height: 1.08;
  letter-spacing: 0;
}

#page-subtitle {
  display: block;
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.search-box {
  width: clamp(320px, 34vw, 560px);
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 15px;
}

.icon-button,
.profile-switch,
.primary,
.secondary,
.danger,
.ghost,
.tab-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.icon-button {
  width: 42px;
  display: grid;
  place-items: center;
  position: relative;
}

.icon-button b {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
}

.profile-switch {
  min-width: 132px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.profile-switch img {
  width: 25px;
  height: 25px;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 154px;
  z-index: 12;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(8, 38, 94, 0.18);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.notification-head strong,
.notification-head span {
  display: block;
}

.notification-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notification-list {
  max-height: 360px;
  overflow: auto;
}

.notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.notification-item.unread {
  background: #f4f8ff;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

.notification-item.unread .notification-dot {
  background: var(--blue-700);
}

.notification-item strong,
.notification-item small,
.notification-item em {
  display: block;
}

.notification-item small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.notification-item em {
  margin-top: 5px;
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.notification-empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.content {
  padding: 32px;
  display: grid;
  gap: 20px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.two-col {
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.85fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.surface,
.kpi,
.table-shell,
.detail-shell,
.mobile-shell,
.device-card,
.payment-method {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.surface,
.table-shell,
.detail-shell {
  padding: 18px;
}

.section-head,
.filter-row,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 18px;
}

.section-head small {
  color: var(--muted);
  font-weight: 700;
}

.kpi {
  min-width: 0;
  min-height: 132px;
  padding: 20px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  overflow: hidden;
}

.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
}

.kpi strong {
  display: block;
  max-width: 100%;
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: clamp(24px, 1.75vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.kpi-value.money {
  font-size: clamp(18px, 1.08vw, 21px);
  line-height: 1.14;
  overflow-wrap: normal;
  word-break: keep-all;
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.delta {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
}

.map-panel {
  min-height: 330px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.25) 24%, transparent 24%) 0 0/90px 90px,
    linear-gradient(rgba(255,255,255,0.25) 24%, transparent 24%) 0 0/90px 90px,
    linear-gradient(135deg, #d8eee4, #edf5ff 56%, #dceafe);
}

.map-road {
  position: absolute;
  height: 11px;
  width: 58%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d8e3ef;
  transform: rotate(-17deg);
  left: -34px;
  top: 118px;
}

.map-road.alt {
  transform: rotate(26deg);
  width: 80%;
  top: 218px;
  left: 68px;
}

.pin {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 4px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 8px 16px rgba(8, 38, 94, 0.16);
}

.pin::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  top: 4px;
  left: 4px;
}

.map-label {
  position: absolute;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 900;
  color: var(--blue-900);
  font-size: 12px;
}

.legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 25px rgba(8, 38, 94, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
}

.geo-map {
  min-height: 380px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(255, 255, 255, 0.42) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 22% 22%, rgba(16, 185, 129, 0.18), transparent 26%),
    radial-gradient(circle at 76% 76%, rgba(47, 125, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #e4f4e9 0%, #eef7ff 54%, #dcecff 100%);
  box-shadow: var(--shadow);
}

.geo-map::before,
.geo-map::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.geo-map::before {
  inset: 0;
  background:
    linear-gradient(125deg, rgba(16, 185, 129, 0.1), transparent 38%),
    linear-gradient(18deg, transparent 0 48%, rgba(255, 255, 255, 0.38) 48% 54%, transparent 54%),
    linear-gradient(102deg, transparent 0 60%, rgba(255, 255, 255, 0.34) 60% 66%, transparent 66%);
}

.geo-map::after {
  inset: auto -8% 0 58%;
  height: 46%;
  background: rgba(190, 219, 255, 0.35);
  clip-path: polygon(10% 0, 100% 22%, 100% 100%, 0 100%);
}

.geo-water {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.28);
  filter: blur(0.2px);
}

.geo-water.west {
  left: -14%;
  bottom: -13%;
  width: 38%;
  height: 34%;
}

.geo-water.east {
  right: -12%;
  top: -16%;
  width: 34%;
  height: 34%;
}

.geo-road {
  position: absolute;
  z-index: 2;
  height: 14px;
  border: 1px solid #c9d9f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 5px rgba(8, 38, 94, 0.08);
  transform-origin: left center;
}

.geo-road span {
  position: absolute;
  left: 46%;
  top: -23px;
  padding: 3px 8px;
  border-radius: 99px;
  color: #49607f;
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.toll-road {
  left: -5%;
  top: 41%;
  width: 82%;
  transform: rotate(-16deg);
}

.toll-road span {
  transform: rotate(16deg);
}

.arterial-road {
  left: 13%;
  top: 31%;
  width: 95%;
  transform: rotate(28deg);
}

.arterial-road span {
  left: 52%;
  top: 17px;
  transform: rotate(-28deg);
}

.city-road {
  height: 9px;
  opacity: 0.9;
}

.city-road.one {
  left: 20%;
  top: 62%;
  width: 55%;
  transform: rotate(-7deg);
}

.city-road.two {
  left: 52%;
  top: 23%;
  width: 36%;
  transform: rotate(15deg);
}

.city-road.three {
  left: 5%;
  top: 72%;
  width: 44%;
  transform: rotate(18deg);
}

.geo-label {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(8, 38, 94, 0.08);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.geo-pin {
  position: absolute;
  z-index: 4;
  display: grid;
  justify-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  transform: translate(-50%, -100%);
}

.geo-pin span {
  position: relative;
  width: 30px;
  height: 30px;
  border: 5px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #2f7dff;
  box-shadow: 0 12px 22px rgba(8, 38, 94, 0.2);
  transform: rotate(-45deg);
}

.geo-pin span::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.geo-pin strong {
  position: absolute;
  left: 50%;
  top: 34px;
  transform: translateX(-50%);
  max-width: 130px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(8, 38, 94, 0.1);
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.geo-pin.active span {
  background: var(--green);
}

.geo-pin.inactive span {
  background: #94a3b8;
}

.geo-pin.pending span {
  background: var(--amber);
}

.geo-pin:hover span {
  transform: rotate(-45deg) scale(1.08);
}

.geo-info-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  width: min(310px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid rgba(223, 231, 243, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(8, 38, 94, 0.12);
  backdrop-filter: blur(8px);
}

.geo-info-card strong,
.geo-info-card span {
  display: block;
}

.geo-info-card span {
  color: var(--muted);
  font-weight: 800;
}

.geo-info-card dl {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
}

.geo-info-card dl div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
}

.geo-info-card dt {
  color: var(--muted);
  font-weight: 900;
}

.geo-info-card dd {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.geo-controls {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 5;
  display: grid;
  gap: 6px;
}

.geo-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(8, 38, 94, 0.08);
}

.geo-legend {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(8, 38, 94, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.geo-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.geo-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.geo-legend .active {
  background: var(--green);
}

.geo-legend .inactive {
  background: #94a3b8;
}

.geo-legend .pending {
  background: var(--amber);
}

.partner-map-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.partner-map-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.partner-map-summary article {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.partner-map-summary span,
.partner-map-summary strong {
  display: block;
}

.partner-map-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.partner-map-summary strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.partner-map-summary .green {
  color: var(--green);
}

.partner-map-summary .gray {
  color: #64748b;
}

.partner-map-summary .amber {
  color: var(--amber);
}

.partner-store-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 430px;
  background: #edf5ff;
}

.partner-store-map .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 38, 94, 0.14);
}

.partner-store-map .leaflet-control-zoom a {
  color: var(--blue-900);
  font-weight: 900;
}

.partner-marker-icon span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 999px 999px 999px 0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
  transform: rotate(-45deg);
}

.partner-marker-icon i {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  background: #fff;
}

.partner-map-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 402;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(223, 231, 243, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 28px rgba(8, 38, 94, 0.14);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.partner-map-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.partner-map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.partner-map-legend .active {
  background: var(--green);
}

.partner-map-legend .inactive {
  background: #94a3b8;
}

.partner-map-legend .pending {
  background: var(--amber);
}

.map-loading {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.map-popup {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.map-popup strong,
.map-popup span {
  display: block;
}

.map-popup > strong {
  font-size: 16px;
  line-height: 1.2;
}

.map-popup > span {
  color: var(--muted);
  font-weight: 800;
}

.map-popup dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.map-popup dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}

.map-popup dt {
  color: var(--muted);
  font-weight: 900;
}

.map-popup dd {
  margin: 0;
  font-weight: 700;
}

.map-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 11px;
}

.map-badge.active {
  color: #047857;
  background: var(--green-soft);
}

.map-badge.inactive {
  color: #64748b;
  background: #f1f5f9;
}

.map-badge.pending {
  color: #a15c00;
  background: var(--amber-soft);
}

.map-detail-button {
  width: 100%;
}

.chart {
  width: 100%;
  height: 295px;
}

.sales-widget {
  align-self: start;
}

.sales-widget-chart .chart {
  height: 230px;
}

.sales-widget-divider {
  height: 1px;
  margin: 10px 0 14px;
  background: var(--line);
}

.compact-head {
  margin-bottom: 10px;
}

.compact-head h3 {
  font-size: 16px;
}

.sales-filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.report-filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.report-filter-panel h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 18px;
}

.report-filter-panel small {
  color: var(--muted);
  font-weight: 800;
}

.report-filter-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.sales-filter-panel h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 18px;
}

.sales-filter-panel small {
  color: var(--muted);
  font-weight: 800;
}

.sales-filter-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-field {
  min-width: 150px;
}

.compact-field .input,
.compact-field select {
  min-width: 150px;
}

.compact-field .year-input {
  min-width: 120px;
}

.is-hidden {
  display: none !important;
}

.sales-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.sales-detail-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.sales-detail-grid span,
.sales-detail-grid small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.sales-detail-grid span {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .04em;
}

.sales-detail-grid strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sales-detail-grid small {
  font-size: 12px;
  line-height: 1.35;
}

.sales-chart-footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
}

.chart-legend {
  min-width: 0;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #2f7dff;
}

.chart-legend.target i {
  background: #10b981;
}

.chart-legend.muted-line {
  grid-template-columns: minmax(0, 1fr) auto;
}

.chart-legend b {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.bar-chart {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 24px;
}

.bar {
  min-height: 34px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #2f7dff, #00b894);
  position: relative;
}

.bar span {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.sales-area-breakdown {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 38px;
  padding-top: 14px;
}

.sales-area-breakdown div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.sales-area-breakdown strong,
.sales-area-breakdown span,
.sales-area-breakdown small {
  display: block;
}

.sales-area-breakdown strong {
  color: var(--navy);
  font-size: 13px;
}

.sales-area-breakdown span {
  margin-top: 3px;
  color: var(--ink);
  font-weight: 900;
}

.sales-area-breakdown small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 800;
}

.pie-layout {
  min-height: 280px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.pie-layout.compact {
  min-height: 0;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
}

.pie-chart {
  width: 210px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(
      #2f7dff 0 38%,
      #10b981 38% 66%,
      #f59e0b 66% 83%,
      #7c3aed 83% 93%,
      #ef4444 93% 100%
    );
}

.pie-chart::before {
  content: "";
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.pie-layout.compact .pie-chart {
  width: 132px;
}

.pie-legend {
  display: grid;
  gap: 11px;
}

.pie-layout.compact .pie-legend {
  gap: 8px;
}

.pie-legend-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 48px minmax(90px, auto);
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 800;
}

.pie-layout.compact .pie-legend-row {
  grid-template-columns: 12px minmax(0, 1fr) 42px;
  gap: 7px;
  font-size: 12px;
}

.pie-layout.compact .pie-legend-row small {
  grid-column: 2 / -1;
  text-align: left;
}

.pie-legend-row i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.pie-legend-row strong {
  color: var(--ink);
}

.pie-legend-row small {
  text-align: right;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: #f7faff;
}

td {
  overflow-wrap: anywhere;
}

tr[data-store-id],
tr[data-payment-id] {
  cursor: pointer;
}

tr[data-store-id]:hover,
tr[data-payment-id]:hover {
  background: #f8fbff;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 99px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.green { color: #047857; background: var(--green-soft); }
.badge.blue { color: var(--blue-700); background: var(--blue-100); }
.badge.amber { color: #a15c00; background: var(--amber-soft); }
.badge.red { color: #c22929; background: var(--red-soft); }
.badge.violet { color: var(--violet); background: var(--violet-soft); }
.badge.gray { color: #5b6475; background: #edf1f6; }

.primary,
.secondary,
.danger,
.ghost {
  padding: 0 14px;
}

.primary {
  color: #fff;
  border-color: var(--blue-700);
  background: var(--blue-700);
}

.secondary {
  color: var(--blue-700);
  border-color: #b9cdf4;
}

.danger {
  color: #c22929;
  border-color: #ffc8c8;
  background: #fff;
}

.small {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ghost {
  background: transparent;
}

.filter-row {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pagination div {
  display: flex;
  gap: 8px;
}

.input,
select,
textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.input {
  min-width: 260px;
}

textarea {
  width: 100%;
  min-height: 116px;
  padding: 12px;
  resize: vertical;
}

.store-hero {
  display: grid;
  grid-template-columns: 180px 1fr minmax(240px, 360px);
  gap: 18px;
  align-items: start;
}

.store-photo,
.thumb {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #edf5ff;
  object-fit: cover;
}

.store-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.mini-map {
  min-height: 150px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #eff7f1, #e9f2ff);
  position: relative;
  overflow: hidden;
}

.mini-map::before,
.mini-map::after {
  content: "";
  position: absolute;
  width: 130%;
  height: 12px;
  background: #fff;
  border: 1px solid #d8e3ef;
  left: -24px;
  top: 55px;
  transform: rotate(-18deg);
}

.mini-map::after {
  top: 102px;
  transform: rotate(24deg);
}

.mini-geo-map {
  min-height: 174px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(135deg, #e3f5ea, #edf6ff 60%, #dbeafe);
}

.mini-geo-map::before,
.mini-geo-map::after {
  display: none;
}

.mini-road,
.mini-water {
  position: absolute;
}

.mini-road {
  z-index: 1;
  height: 10px;
  border: 1px solid #c9d9f2;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 4px rgba(8, 38, 94, 0.08);
}

.mini-road.main {
  left: -14%;
  top: 45%;
  width: 94%;
  transform: rotate(-17deg);
}

.mini-road.alt {
  left: 17%;
  top: 48%;
  width: 92%;
  transform: rotate(25deg);
}

.mini-water {
  right: -18%;
  bottom: -22%;
  width: 48%;
  height: 48%;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.28);
}

.mini-pin {
  z-index: 3;
}

.mini-pin span {
  width: 24px;
  height: 24px;
  border-width: 4px;
}

.mini-pin {
  width: 24px;
  height: 24px;
}

.mini-pin span::after {
  left: 6px;
  top: 6px;
  width: 4px;
  height: 4px;
}

.mini-map-card {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  max-width: calc(100% - 24px);
  padding: 9px 10px;
  border: 1px solid rgba(223, 231, 243, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(8, 38, 94, 0.1);
}

.mini-map-card strong,
.mini-map-card span {
  display: block;
}

.mini-map-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.google-map-card {
  min-height: 220px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf5ff;
  box-shadow: var(--shadow);
}

.google-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.google-map-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(223, 231, 243, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(8, 38, 94, 0.14);
  backdrop-filter: blur(8px);
}

.google-map-overlay strong,
.google-map-overlay span {
  display: block;
}

.google-map-overlay span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.map-actions {
  display: flex;
  gap: 8px;
}

.map-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  margin: 16px 0;
}

.tab-button {
  border-color: transparent;
  background: transparent;
  white-space: nowrap;
  color: var(--muted);
}

.tab-button.active {
  color: var(--blue-700);
  border-color: #c6d8fb;
  background: var(--blue-100);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  font-size: 13px;
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.review-layout {
  display: grid;
  grid-template-columns: 1fr 250px 1fr;
  gap: 18px;
  align-items: start;
}

.receipt {
  min-height: 420px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 6px #f2f6fd;
}

.receipt-bank {
  font-size: 24px;
  color: var(--blue-700);
  font-weight: 900;
}

.receipt-amount {
  margin: 28px 0;
  text-align: center;
}

.receipt-amount span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.receipt-amount strong {
  display: block;
  font-size: 28px;
}

.proof-receipt {
  display: grid;
  gap: 12px;
  align-content: start;
}

.proof-receipt img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 8px 0 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  min-height: 66px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-item.active .timeline-dot {
  background: var(--blue-700);
}

.timeline-item.done .timeline-dot {
  background: var(--green);
}

.invoice {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.invoice-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.invoice-company {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.invoice-company img {
  width: 58px;
  height: 58px;
}

.invoice-company h2,
.invoice-company p,
.invoice-title p {
  margin: 0;
}

.invoice-title {
  text-align: right;
}

.invoice-title h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.document-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.8fr);
  gap: 14px;
  margin-bottom: 22px;
}

.document-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.document-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.document-box strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.document-box p {
  margin: 6px 0 0;
  color: var(--muted);
}

.invoice-table {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.invoice-table th {
  color: var(--muted);
  background: #f3f7fc;
  text-transform: none;
}

.invoice-table th,
.invoice-table td {
  padding: 12px 14px;
}

.invoice-table th:last-child,
.invoice-table td:last-child {
  text-align: right;
}

.summary-row td {
  background: #fbfdff;
  font-weight: 800;
}

.total-row {
  font-size: 18px;
  font-weight: 900;
}

.document-footer-note {
  margin-top: 18px;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  padding: 12px 14px;
  font-weight: 700;
}

.dashboard-insights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overdue-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: #ffc8c8;
  background: linear-gradient(135deg, #fff, #fff5f5);
}

.overdue-alert strong,
.overdue-alert span {
  display: block;
}

.overdue-alert strong {
  color: #b91c1c;
  font-size: 18px;
}

.overdue-alert span {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 800;
}

.ops-card {
  min-height: 188px;
}

.ops-list {
  display: grid;
  gap: 10px;
}

.ops-list.compact {
  gap: 8px;
}

.ops-item {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fbff;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.ops-item:hover {
  border-color: #9bbcf6;
  background: #f4f8ff;
}

.ops-item.danger-state {
  border-color: #ffd6d6;
  background: #fff7f7;
}

.ops-item.danger-state strong {
  color: var(--red);
}

.ops-item strong {
  color: var(--blue-700);
  font-size: 26px;
  line-height: 1;
}

.ops-item span {
  color: var(--muted);
  font-weight: 800;
}

.ops-row {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.ops-row strong {
  min-width: 0;
  color: var(--ink);
}

.ops-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: start;
  gap: 6px 12px;
  padding: 12px;
}

.activity-item strong {
  grid-column: 2;
  min-width: 0;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.activity-item small {
  grid-column: 2;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.activity-type {
  grid-column: 1;
  grid-row: 1 / span 2;
  justify-self: start;
  width: 82px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: capitalize;
}

.audit-shell {
  overflow-x: auto;
}

.audit-table th:nth-child(1) { width: 190px; }
.audit-table th:nth-child(2) { width: 120px; }
.audit-table th:nth-child(3) { width: 120px; }
.audit-table th:nth-child(5) { width: 160px; }

.audit-table td strong,
.audit-table td small {
  display: block;
}

.audit-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.entity-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--blue-800);
  background: #f2f7ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.profile-photo-wrap {
  width: 132px;
  height: 132px;
}

.profile-photo {
  width: 132px;
  height: 132px;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(8, 38, 94, 0.16);
  display: grid;
  place-items: center;
  object-fit: cover;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-950));
  font-size: 34px;
  font-weight: 900;
}

.profile-card h2 {
  margin: 8px 0 0;
}

.profile-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.profile-info {
  width: 100%;
  margin-top: 10px;
  text-align: left;
}

.shipping-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 18px;
}

.shipping-list {
  position: sticky;
  top: 120px;
}

.document-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.document-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  display: grid;
  gap: 6px;
  padding: 12px;
  text-align: left;
}

.document-item:hover,
.document-item.active {
  border-color: #9bbcf6;
  background: #f4f8ff;
}

.document-item strong,
.document-item small,
.document-item em {
  display: block;
}

.document-item strong {
  font-size: 15px;
}

.document-item small {
  color: var(--muted);
  font-weight: 700;
}

.document-item em {
  color: var(--blue-900);
  font-style: normal;
  font-weight: 900;
}

.shipping-preview {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.shipping-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 14px;
}

.shipping-toolbar h2 {
  margin: 0;
}

.shipping-toolbar small {
  color: var(--muted);
  font-weight: 800;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.shipping-preview .invoice {
  width: 100%;
  max-width: none;
}

.shipping-route,
.signature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.shipping-route div,
.signature-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.shipping-route span,
.signature-grid span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.shipping-route strong,
.signature-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.shipping-route small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.signature-grid div {
  min-height: 110px;
  display: grid;
  align-content: space-between;
}

.mobile-preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.phone {
  width: min(100%, 150px);
  min-height: 300px;
  margin: 0 auto;
  border: 8px solid #101624;
  border-radius: 24px;
  background: #f8fbff;
  overflow: hidden;
  box-shadow: 0 18px 32px rgba(8, 38, 94, 0.18);
}

.phone-bar {
  height: 48px;
  color: #fff;
  background: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 900;
}

.phone-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.phone-body {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.phone-body h3 {
  margin: 0 0 2px;
  font-size: 17px;
  line-height: 1.15;
}

.phone-card {
  min-height: 50px;
  padding: 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
}

.phone-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.2;
}

.phone-card.compact {
  min-height: 38px;
}

.phone-list {
  display: grid;
  gap: 6px;
  padding: 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.phone-list span {
  height: 8px;
  border-radius: 99px;
  background: #dbeafe;
}

.phone-list span:nth-child(2) {
  width: 76%;
  background: #d1fae5;
}

.phone-list span:nth-child(3) {
  width: 58%;
  background: #fef3c7;
}

.device-card,
.payment-method {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.device-visual {
  min-height: 105px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eaf2ff, #dff6ff);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.device-visual.laptop::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 18%;
  height: 56%;
  border: 8px solid var(--blue-900);
  border-radius: 8px;
  background: #fff;
}

.device-visual.printer::after {
  content: "";
  position: absolute;
  width: 56%;
  height: 42%;
  left: 22%;
  top: 34%;
  border-radius: 8px;
  background: var(--blue-950);
  box-shadow: 0 -24px 0 #fff;
}

.device-visual.phone-device::after {
  content: "";
  position: absolute;
  width: 38%;
  height: 72%;
  left: 31%;
  top: 14%;
  border-radius: 16px;
  border: 8px solid var(--blue-950);
  background: #fff;
}

.payment-method {
  grid-template-columns: 56px 1fr;
  align-items: center;
}

.method-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue-700);
  font-weight: 900;
}

.finance-control-panel {
  display: grid;
  gap: 14px;
}

.finance-panel {
  overflow-x: auto;
}

.finance-panel table {
  min-width: 880px;
}

.finance-mini-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.finance-mini-card span,
.finance-mini-card strong,
.finance-mini-card small {
  display: block;
}

.finance-mini-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.finance-mini-card strong {
  margin-top: 8px;
  font-size: clamp(18px, 1.2vw, 22px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.finance-mini-card small {
  margin-top: 5px;
  color: var(--green);
  font-weight: 900;
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.auth-mode {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.2), transparent 20rem),
    radial-gradient(circle at 90% 10%, rgba(47, 125, 255, 0.22), transparent 24rem),
    linear-gradient(135deg, #061b46, #0b3d91 58%, #f8fbff 58%);
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 520px);
  align-items: center;
  gap: 48px;
  padding: clamp(24px, 6vw, 80px);
}

.login-brand-panel {
  color: #fff;
}

.login-brand-panel img {
  width: 88px;
  height: 88px;
  margin-bottom: 26px;
}

.login-brand-panel h1 {
  font-size: clamp(42px, 6vw, 76px);
  margin-bottom: 14px;
}

.login-brand-panel p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
}

.login-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.login-highlights span {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.login-card {
  display: grid;
  gap: 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 70px rgba(6, 27, 70, 0.22);
}

.login-card h2 {
  margin-bottom: 8px;
  font-size: 32px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-submit {
  width: 100%;
  min-height: 46px;
}

.login-demo {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  background: #f4f8fd;
  color: var(--muted);
  font-size: 13px;
}

.login-demo strong {
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 27, 70, 0.48);
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(6, 27, 70, 0.24);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gps-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field .input,
.field select {
  width: 100%;
  color: var(--ink);
  font-weight: 500;
}

.field-wide {
  grid-column: 1 / -1;
}

.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--red);
  font-weight: 800;
}

.order-items {
  display: grid;
  gap: 8px;
}

.order-item-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 80px 120px auto;
  gap: 8px;
  align-items: center;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.primary:disabled,
.secondary:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 12px;
  }

  .brand {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brand div,
  .nav-item:not(.active) {
    font-size: 0;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .user-card {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .user-card div:not(.avatar) {
    display: none;
  }

  .kpi-grid,
  .dashboard-insights,
  .sales-detail-grid,
  .mobile-preview-grid,
  .four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col,
  .review-layout,
  .document-meta-row,
  .profile-layout,
  .store-hero,
  .shipping-workspace {
    grid-template-columns: 1fr;
  }

  .shipping-list {
    position: static;
  }

  .sales-filter-panel,
  .report-filter-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

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

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-radius: 0;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-item,
  .nav-item:not(.active) {
    font-size: 11px;
  }

  .topbar {
    display: flex;
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
  }

  .top-actions,
  .filter-row,
  .section-head,
  .invoice-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .content {
    padding: 18px;
  }

  .kpi-grid,
  .dashboard-insights,
  .sales-detail-grid,
  .three-col,
  .info-grid,
  .mobile-preview-grid {
    grid-template-columns: 1fr;
  }

  .sales-filter-controls,
  .report-filter-controls,
  .compact-field,
  .compact-field .input,
  .compact-field select {
    width: 100%;
  }

  .shipping-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions,
  .shipping-route,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    display: grid;
    justify-content: stretch;
  }

  .toolbar-actions button {
    width: 100%;
  }

  .activity-item {
    grid-template-columns: 1fr;
  }

  .activity-type,
  .activity-item strong,
  .activity-item small {
    grid-column: 1;
  }

  .activity-type {
    grid-row: auto;
    width: max-content;
  }

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

  table {
    min-width: 680px;
  }

  .input,
  select {
    width: 100%;
  }

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

  .four-col {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .notification-panel {
    top: auto;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .geo-map {
    min-height: 520px;
  }

  .geo-road span {
    display: none;
  }

  .geo-label,
  .geo-pin strong {
    font-size: 11px;
  }

  .geo-controls {
    top: 12px;
    right: 12px;
  }

  .geo-info-card {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }

  .geo-legend {
    left: 12px;
    bottom: 152px;
  }

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

  .partner-store-map {
    height: 520px;
  }

  .partner-map-legend {
    left: 12px;
    bottom: 12px;
  }

  .google-map-card {
    min-height: 300px;
  }

  .google-map-overlay {
    grid-template-columns: 1fr;
  }

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

  .gps-field {
    grid-template-columns: 1fr;
  }

  .order-item-row,
  .pagination {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .login-page {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 20px;
  }

  .login-brand-panel p {
    font-size: 16px;
  }

  .login-card {
    padding: 22px;
  }

  .pie-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pie-layout.compact {
    grid-template-columns: 1fr;
  }

  .pie-legend {
    width: 100%;
  }

  .pie-legend-row {
    grid-template-columns: 14px minmax(0, 1fr) 44px;
  }

  .pie-legend-row small {
    grid-column: 2 / -1;
    text-align: left;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  html,
  body {
    width: 210mm;
    min-width: 0;
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .shipping-preview .invoice,
  .shipping-preview .invoice * {
    visibility: visible !important;
  }

  .sidebar,
  .topbar,
  .shipping-list,
  .shipping-toolbar,
  .notification-panel,
  .modal-backdrop {
    display: none !important;
  }

  .app-shell,
  .main,
  .content,
  .shipping-workspace,
  .shipping-preview {
    display: block !important;
    width: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  .shipping-preview .invoice {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }

  .invoice-table,
  .invoice-total-box,
  .document-footer-note,
  .signature-box {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
