:root {
  --toss-blue: #3182f6;
  --toss-blue-hover: #1b64da;
  --bg-canvas: #f2f4f6;
  --bg-surface: #ffffff;
  --text-main: #191f28;
  --text-sub: #4e5968;
  --text-muted: #8b95a1;
  --border-color: #e5e8eb;
  --danger: #f04452;
  --success: #00a645;
  --warning: #f59f00;
  --sidebar-width: 240px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Pretendard", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: var(--bg-canvas);
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sidebar {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--toss-blue);
}

.sub-text {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.nav-menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 700;
  transition: 0.2s;
}

.nav-item:hover {
  background: var(--bg-canvas);
  color: var(--text-main);
}

.nav-item.active {
  background: #e8f3ff;
  color: var(--toss-blue);
}

.logout-wrap {
  display: grid;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.pos-launch {
  padding: 16px 24px 0;
}

.pos-launch-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--toss-blue);
  box-shadow: 0 6px 16px rgba(49, 130, 246, 0.28);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  padding: 15px 16px;
  transition: 0.2s;
}

.pos-launch-btn:hover {
  background: var(--toss-blue-hover);
}

.pos-launch-caption {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.main-content {
  display: flex;
  max-width: 1440px;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  flex-direction: column;
  gap: 28px;
  padding: 40px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-header p {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 14px;
}

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

.metric-card,
.card {
  border: 1px solid rgba(0, 0, 0, 0.03);
  background: var(--bg-surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.metric-card {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px;
  padding: 24px;
}

.metric-label {
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 700;
}

.metric-value {
  color: var(--text-main);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.metric-value.highlight {
  color: var(--toss-blue);
}

.metric-value.danger {
  color: var(--danger);
}

.metric-caption {
  color: var(--text-muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.full-width {
  grid-column: 1 / -1;
}

.card {
  border-radius: 20px;
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card-title {
  color: var(--text-main);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.muted-link {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.qr-box {
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px dashed #d1d6db;
  border-radius: 16px;
  background: #f9fafb;
  padding: 20px;
}

.qr-image {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border: 8px solid #fff;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(25, 31, 40, 0.08);
}

.qr-info h3 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 800;
}

.qr-info p {
  margin-bottom: 12px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
}

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

.stat-badge,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.stat-badge {
  border-radius: 8px;
  background: #e8f3ff;
  color: var(--toss-blue);
  padding: 7px 10px;
}

.badge {
  padding: 6px 10px;
}

.badge.green {
  background: #e4f4ec;
  color: var(--success);
}

.badge.red {
  background: #fde8e9;
  color: var(--danger);
}

.badge.blue {
  background: #e8f3ff;
  color: var(--toss-blue);
}

.badge.gray {
  background: var(--bg-canvas);
  color: var(--text-sub);
}

.badge.orange {
  background: #fff4de;
  color: var(--warning);
}

.list-stack {
  display: grid;
  gap: 0;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
}

.list-item:first-child {
  padding-top: 0;
}

.list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.list-title {
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 800;
}

.list-meta {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.list-value {
  flex: 0 0 auto;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  border-bottom: 1px solid var(--border-color);
  background: #f9fafb;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  padding: 12px 16px;
  white-space: nowrap;
}

th:first-child {
  border-top-left-radius: 12px;
}

th:last-child {
  border-top-right-radius: 12px;
}

td {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 14px;
  padding: 16px;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group.inline-actions {
  flex-direction: row;
}

.form-grid[hidden] {
  display: none;
}

.form-label {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 800;
}

.form-control {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  outline: none;
  background: #fafafb;
  color: var(--text-main);
  font-size: 14px;
  padding: 12px 16px;
  transition: 0.2s;
}

textarea.form-control {
  min-height: 88px;
  resize: vertical;
}

.form-control:focus {
  border-color: var(--toss-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
}

.mini-input {
  width: 76px;
  padding: 7px 8px;
  text-align: center;
}

.badge[hidden] {
  display: none;
}

.btn[hidden] {
  display: none;
}

.demand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.member-dist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.member-dist .chart-box h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.grade-badge {
  display: inline-block;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f9fafb;
}

.report-metric.clickable {
  cursor: pointer;
}

.report-metric.clickable:hover {
  border-color: var(--toss-blue);
}

#memberPolicyForm {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}

#memberPolicyForm .policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

#memberPolicyForm h4 {
  margin: 4px 0 8px;
  font-size: 14px;
}

.insight-box {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.channel-qr {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px dashed #d1d6db;
  border-radius: 14px;
  background: #f9fafb;
  padding: 12px;
  margin: 4px 0 10px;
}

.channel-qr[hidden] {
  display: none;
}

.channel-qr .qr-svg {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 10px;
}

.channel-qr .qr-svg svg {
  display: block;
  width: 100%;
  height: 100%;
}

.consent-table td,
.consent-table th {
  padding: 8px 10px;
  font-size: 13px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 16px;
  margin-bottom: 14px;
}

.profile-grid span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-grid strong {
  font-size: 14px;
}

.report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.report-controls .form-control {
  width: auto;
  padding: 8px 12px;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.report-metric {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 16px;
}

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

.report-metric strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 20px;
}

.report-metric small {
  color: var(--text-muted);
  font-size: 12px;
}

.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.chart-box {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 16px;
}

.chart-box h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  border-bottom: 1px solid var(--border-color);
}

.bar-chart .bar {
  flex: 1;
  min-width: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--toss-blue);
  opacity: 0.85;
}

.bar-chart .bar.negative {
  background: #f04452;
}

.bar-labels {
  display: flex;
  gap: 3px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.bar-labels span {
  flex: 1;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

td.num,
th.num {
  text-align: right;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: #f2f4f6;
}

.segmented button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
}

.segmented button.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  color: var(--text-main);
}

.segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.segmented.small button {
  font-size: 12px;
  padding: 4px 10px;
}

.period-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.period-nav[hidden] {
  display: none;
}

.period-nav strong {
  min-width: 150px;
  font-size: 16px;
  text-align: center;
}

.nav-arrow {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.nav-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.delta,
.report-metric span.delta {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 800;
}

.delta.up {
  color: #e8344e;
}

.delta.down {
  color: #3182f6;
}

.delta.flat {
  color: var(--text-muted);
}

.trend-box {
  margin-bottom: 16px;
}

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

.trend-head h4 {
  margin: 0;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-sub);
  font-size: 12px;
  margin-bottom: 4px;
}

.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 3px;
  vertical-align: -1px;
}

.chart-legend i.line {
  height: 0;
  border-top: 2px dashed #8b95a1;
  border-radius: 0;
  vertical-align: 3px;
}

.svg-chart {
  position: relative;
}

.svg-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.svg-chart .hit:hover {
  fill: rgba(49, 130, 246, 0.07);
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 190px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(25, 31, 40, 0.94);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
  white-space: nowrap;
}

.chart-tooltip b {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.chart-tooltip .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.chart-tooltip .sub {
  color: #b0b8c1;
}

.mini-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.share-row {
  display: grid;
  grid-template-columns: 96px 1fr 104px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.share-row .track {
  height: 10px;
  border-radius: 999px;
  background: #f2f4f6;
  overflow: hidden;
}

.share-row .fill {
  height: 100%;
  border-radius: 999px;
  background: var(--toss-blue);
}

.share-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-row span:last-child {
  text-align: right;
  white-space: nowrap;
  font-weight: 800;
}

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

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tab-btn {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #fff;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px;
}

.tab-btn.active {
  border-color: var(--toss-blue);
  background: rgba(49, 130, 246, 0.08);
  color: var(--toss-blue);
}

.po-detail {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-top: 16px;
  padding: 18px;
}

.po-detail h3 {
  margin: 0;
  font-size: 17px;
}

tr.clickable {
  cursor: pointer;
}

tr.clickable:hover td,
tr.selected td {
  background: #f5f9ff;
}

.ship-grid {
  display: grid;
  min-width: 280px;
  grid-template-columns: 96px 1fr auto auto;
  gap: 6px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 16px;
  text-align: center;
  transition: 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--toss-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--toss-blue-hover);
}

.btn-outline {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-sub);
}

.btn-outline:hover {
  background: var(--bg-canvas);
}

.btn-danger {
  background: #fde8e9;
  color: var(--danger);
}

.btn-sm {
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 12px;
}

.product-name-cell {
  align-items: center;
  display: flex;
  gap: 10px;
}

.product-thumb {
  background: #f2f4f6;
  border-radius: 10px;
  flex-shrink: 0;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.product-thumb.empty {
  align-items: center;
  color: #8b95a1;
  display: inline-flex;
  font-size: 10px;
  justify-content: center;
}

.media-section {
  border-top: 1px solid #eef0f3;
  padding: 16px 0;
}

.media-section:first-child {
  border-top: none;
  padding-top: 0;
}

.media-heading {
  font-size: 15px;
  margin: 0 0 10px;
}

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

.media-tile {
  margin: 0;
}

.media-tile img {
  aspect-ratio: 1 / 1;
  background: #f2f4f6;
  border-radius: 12px;
  object-fit: cover;
  width: 100%;
}

.media-tile figcaption {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
  margin-top: 6px;
}

.muted-link.danger {
  color: var(--danger);
}

.mfds-linked {
  background: #f4f8ff;
  border-radius: 12px;
  font-size: 14px;
  padding: 12px 14px;
}

.mfds-linked.pending,
.media-tile.pending img {
  outline: 2px solid #f6b26b;
}

.mfds-linked.pending {
  background: #fff7ed;
}

.text-warn {
  color: #b35c00;
}

.verify-compare {
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
  width: 100%;
}

.verify-compare th,
.verify-compare td {
  border-top: 1px solid #e5e8eb;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.verify-compare th {
  color: var(--text-sub);
  font-weight: 700;
  white-space: nowrap;
  width: 76px;
}

.verify-compare .ok {
  color: #1b8a3a;
  font-weight: 700;
}

.verify-compare .diff {
  color: #b35c00;
  font-weight: 700;
}

.verify-bar {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #f6d3a8;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.mall-visibility {
  border: 1px solid #d7e6fb;
  border-radius: 14px;
  background: #f4f8ff;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
}

.mall-visibility.is-empty {
  border-color: #f6d3a8;
  background: #fff7ed;
}

.mall-visibility-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mall-visibility-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
}

.mall-visibility-reasons span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 48px));
  border: 1px solid rgba(49, 130, 246, 0.14);
  border-radius: 14px;
  background: rgba(25, 31, 40, 0.9);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  padding: 14px 16px;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.2s;
  white-space: pre-wrap;
}

.notice.show {
  opacity: 1;
  transform: translateY(0);
}

.login-shell {
  display: none;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(49, 130, 246, 0.16), transparent 32%),
    var(--bg-canvas);
}

.login-card {
  width: min(440px, 100%);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(25, 31, 40, 0.1);
  padding: 32px;
}

.login-card h1 {
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.login-card p {
  margin-bottom: 24px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.55;
}

.empty {
  border: 1px dashed #d1d6db;
  border-radius: 16px;
  background: #fbfcfd;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  padding: 28px;
  text-align: center;
}

.loading {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

body.guest .app-shell {
  display: none;
}

.modal-backdrop {
  align-items: flex-start;
  background: rgba(25, 31, 40, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 48px 16px;
  position: fixed;
  z-index: 100;
}

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

.modal-card {
  background: var(--bg-surface);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  max-width: 760px;
  padding: 24px;
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

#products .card-header,
#staff .card-header {
  flex-wrap: wrap;
}

.product-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-toolbar .form-control {
  padding: 8px 12px;
  width: 260px;
}

.row-no {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
  width: 48px;
}

.pager {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 16px;
}

.pager button {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-width: 34px;
  padding: 7px 10px;
}

.pager button.active {
  background: var(--toss-blue);
  border-color: var(--toss-blue);
  color: #fff;
}

.pager button:disabled {
  cursor: default;
  opacity: 0.4;
}

.pager .gap {
  color: var(--text-muted);
  padding: 0 4px;
}

body.guest .login-shell {
  display: grid;
}

@media (max-width: 1120px) {
  .dashboard-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
  }

  .logout-wrap,
  .pos-launch-caption {
    display: none;
  }

  .pos-launch {
    padding: 0 16px 12px;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .qr-box {
    align-items: flex-start;
    flex-direction: column;
  }

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

.imp-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.imp-mode {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
}

.imp-mode input {
  display: none;
}

.imp-mode span {
  color: var(--text-sub);
  font-size: 13px;
}

.imp-mode.active {
  border-color: var(--toss-blue);
  background: #f2f8ff;
}

.imp-mode.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.imp-drop {
  border: 1px dashed #c4cad1;
  border-radius: 14px;
  background: #f9fafb;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.imp-step {
  margin-top: 20px;
}

.imp-step h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.imp-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
}

.imp-map-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
}

.imp-map-row .form-label {
  margin: 0;
}

.imp-sample {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imp-req {
  color: var(--danger);
  font-size: 11px;
}

.imp-inline {
  width: auto;
  display: inline-block;
  padding: 7px 8px;
}

.imp-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 14px;
}

.imp-warn {
  border-color: #ffd8a8;
  background: #fff9f0;
  color: #8a4b00;
  font-size: 13px;
}

.imp-done {
  border-color: #b2f2bb;
  background: #f3fbf5;
}

.imp-loading {
  border-color: var(--toss-blue);
  color: var(--toss-blue);
  font-weight: 700;
}

.imp-actions {
  margin-top: 18px;
  align-items: center;
}

.imp-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.imp-count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 86px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-sub);
}

.imp-count strong {
  font-size: 17px;
  color: var(--text-main);
}

.imp-count.active {
  border-color: var(--toss-blue);
  background: #f2f8ff;
}

.imp-count.danger strong {
  color: var(--danger);
}

.imp-change {
  font-size: 13px;
  white-space: nowrap;
}

.imp-change span {
  color: var(--text-muted);
}

.imp-msg {
  font-size: 12px;
}

.imp-msg.warning {
  color: #b35c00;
}

.imp-msg.error {
  color: var(--danger);
}

.imp-guide {
  margin: 8px 0 0 18px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.6;
}
