:root {
  --sa-bg: #f9f9fb;
  --sa-surface: #ffffff;
  --sa-border: #e8e8ec;
  --sa-border-soft: #f0f0f3;
  --sa-ink: #171717;
  --sa-ink-body: #262626;
  --sa-muted: #6e6e77;
  --sa-brand: #7a1e2e;
  --sa-brand-hover: #631624;
  --sa-brand-soft: #faeef0;
  --sa-profit: #15803d;
  --sa-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--sa-bg);
  color: var(--sa-ink);
  font-family: var(--sa-font);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

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

.sa-sidebar {
  background: var(--sa-surface);
  border-right: 1px solid #ececef;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sa-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  text-decoration: none;
}

.sa-brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--sa-brand);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sa-brand-text {
  display: flex;
  flex-direction: column;
}

.sa-brand-text strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--sa-ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sa-brand-text span {
  font-size: 13px;
  color: var(--sa-muted);
  font-weight: 400;
  margin-top: 2px;
}

.sa-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sa-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--sa-ink-body);
  transition: background 0.15s ease, color 0.15s ease;
}

.sa-nav-link svg {
  flex-shrink: 0;
  color: currentColor;
}

.sa-nav-link:hover {
  background: #f4f4f7;
  color: var(--sa-ink);
}

.sa-nav-link.is-active {
  background: var(--sa-brand-soft);
  color: var(--sa-brand);
  font-weight: 700;
}

.sa-sidebar-foot {
  border-top: 1px solid #f0f0f3;
  padding-top: 14px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-foot-link {
  font-size: 13px;
  color: var(--sa-muted);
  padding: 4px 10px;
}

.sa-foot-link:hover {
  color: var(--sa-brand);
}

.sa-logout-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--sa-muted);
  cursor: pointer;
  border-radius: 8px;
}

.sa-logout-btn:hover {
  background: #f4f4f7;
  color: #991b1b;
}

.sa-main {
  padding: 28px 36px 48px;
  max-width: 1320px;
  width: 100%;
}

.sa-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.sa-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--sa-ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sa-date-sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--sa-muted);
}

.sa-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sa-select-pill {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid #dedee4;
  border-radius: 10px;
  padding: 9px 38px 9px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--sa-ink);
  cursor: pointer;
}

.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.sa-btn-primary {
  background: var(--sa-brand);
  color: #ffffff;
  border-color: var(--sa-brand);
}

.sa-btn-primary:hover {
  background: var(--sa-brand-hover);
  border-color: var(--sa-brand-hover);
}

.sa-btn-outline {
  background: #ffffff;
  color: var(--sa-ink-body);
  border-color: #dedee4;
}

.sa-btn-outline:hover {
  background: #f4f4f7;
}

.sa-btn-block {
  width: 100%;
}

.sa-btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #dedee4;
  background: #ffffff;
  color: var(--sa-ink-body);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sa-btn-sm:hover {
  border-color: var(--sa-brand);
  color: var(--sa-brand);
}

.sa-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.sa-kpi-card {
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-kpi-label {
  font-size: 14px;
  color: var(--sa-muted);
  font-weight: 500;
}

.sa-kpi-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--sa-ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sa-mid-grid {
  display: grid;
  grid-template-columns: 1.62fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.sa-card {
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: 14px;
  padding: 20px 24px;
}

.sa-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--sa-ink);
  letter-spacing: -0.01em;
}

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

.sa-card-head h2 {
  margin: 0;
}

.sa-more-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--sa-brand);
}

.sa-more-link:hover {
  text-decoration: underline;
}

.sa-chart-wrap {
  width: 100%;
  padding-top: 2px;
}

.sa-line-chart {
  width: 100%;
  height: auto;
  display: block;
}

.sa-chart-grid line {
  stroke: #f0f0f3;
  stroke-width: 1;
}

.sa-chart-vgrid line {
  stroke: #f6f6f9;
  stroke-width: 1;
}

.sa-chart-grid text,
.sa-chart-xlabels text {
  fill: var(--sa-muted);
  font-size: 12px;
  font-family: var(--sa-font);
}

.sa-chart-dots circle {
  fill: #ffffff;
  stroke: var(--sa-brand);
  stroke-width: 2.5px;
}

.sa-todo-list {
  display: flex;
  flex-direction: column;
}

.sa-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2px;
  border-bottom: 1px solid var(--sa-border-soft);
  color: var(--sa-ink);
  transition: color 0.15s ease;
}

.sa-todo-item:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.sa-todo-item:hover .sa-todo-left {
  color: var(--sa-brand);
}

.sa-todo-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--sa-ink-body);
}

.sa-todo-left svg {
  color: #404048;
  flex-shrink: 0;
}

.sa-todo-count {
  font-size: 16px;
  font-weight: 800;
  color: var(--sa-ink);
}

.sa-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.sa-table th {
  text-align: left;
  padding: 11px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sa-muted);
  border-bottom: 1px solid #ececef;
  white-space: nowrap;
}

.sa-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f2f2f5;
  color: var(--sa-ink-body);
  vertical-align: middle;
}

.sa-table tbody tr:last-child td {
  border-bottom: 0;
}

.sa-table tbody tr:hover td {
  background: #fcfcfd;
}

.text-right {
  text-align: right !important;
}

.d-block {
  display: block;
}

.text-muted {
  color: var(--sa-muted);
  font-size: 12.5px;
}

.text-profit {
  color: var(--sa-profit);
  font-weight: 600;
  white-space: nowrap;
}

.sa-order-id {
  font-weight: 800;
  color: var(--sa-ink);
  white-space: nowrap;
}

.sa-order-id:hover {
  color: var(--sa-brand);
}

.sa-amount {
  font-weight: 600;
  color: var(--sa-ink);
  white-space: nowrap;
}

.sa-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.sa-badge.st-new {
  background: #fef3c7;
  color: #92400e;
}

.sa-badge.st-packing {
  background: #dbeafe;
  color: #1e40af;
}

.sa-badge.st-shipping {
  background: #dcfce7;
  color: #166534;
}

.sa-badge.st-done {
  background: #dcfce7;
  color: #15803d;
}

.sa-badge.st-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.sa-badge.st-unlinked {
  background: #f2f2f5;
  color: #52525b;
}

.sa-bridge-banner {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
  border-color: #d8b4bc;
  background: #fffdfd;
}

.sa-bridge-left h2 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.sa-bridge-left p {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--sa-ink-body);
}

.sa-bridge-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--sa-ink-body);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sa-bridge-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
  padding: 16px;
  border: 1px dashed #d8b4bc;
  border-radius: 12px;
}

.sa-bookmarklet-pill {
  text-align: center;
  padding: 12px 16px;
  cursor: grab;
  box-shadow: 0 6px 16px rgba(122, 30, 46, 0.18);
}

.sa-oauth-dot.is-off {
  background: #a1a1aa;
  box-shadow: none;
}

.sa-oauth-session-box.is-unlinked {
  background: #fafafa;
  border-style: dashed;
}

.sa-alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
}

.sa-alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.sa-alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.sa-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f3;
}

.sa-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sa-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sa-ink-body);
  background: #f4f4f7;
}

.sa-pill.is-active {
  background: var(--sa-brand-soft);
  color: var(--sa-brand);
}

.sa-search-row {
  display: flex;
  gap: 8px;
}

.sa-search-row input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #dedee4;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}

.sa-act-group {
  display: inline-flex;
  gap: 6px;
}

.sa-drawer-card {
  margin-bottom: 18px;
  border-color: #d8b4bc;
  background: #fffdfd;
}

.sa-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.sa-drawer-box {
  background: #ffffff;
  border: 1px solid var(--sa-border);
  border-radius: 12px;
  padding: 16px;
}

.sa-drawer-box h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}

.sa-drawer-box p {
  margin: 6px 0;
  font-size: 13.5px;
}

.sa-drawer-lines {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e5ea;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}

.sa-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sa-muted);
  margin: 10px 0 4px;
}

.sa-form input[type="text"],
.sa-form input[type="password"],
.sa-form input[type="tel"],
.sa-form input[type="number"],
.sa-form select,
.sa-form textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #dedee4;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--sa-ink);
  background: #ffffff;
}

.sa-input-readonly {
  background: #f6f6f9 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 12.5px !important;
  color: var(--sa-brand) !important;
}

.sa-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sa-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 12px 0 !important;
  cursor: pointer;
}

.sa-prod-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 240px;
}

.sa-prod-cell img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #ececef;
  background: #f9f9fb;
}

.sa-input-sm {
  padding: 6px 8px;
  border: 1px solid #dedee4;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
}

.sa-ch-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f4f4f7;
  font-size: 12px;
  font-weight: 600;
  margin-right: 4px;
}

.sa-pnl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-pnl > div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f2f2f5;
  font-size: 14px;
}

.sa-pnl > div.is-sub {
  background: #f9f9fb;
  padding: 10px 12px;
  border-radius: 8px;
}

.sa-pnl > div.is-total {
  background: var(--sa-brand-soft);
  color: var(--sa-brand);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15.5px;
  border-bottom: 0;
}

.sa-pnl dd {
  margin: 0;
}

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

.sa-api-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f3;
  margin-bottom: 8px;
}

.sa-api-head > div {
  min-width: 0;
  flex: 1;
}

.sa-api-head .sa-badge {
  flex-shrink: 0;
}

.sa-api-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}

.sa-api-url {
  display: block;
  font-size: 12px;
  color: var(--sa-muted);
  word-break: break-all;
}

.sa-table td code {
  font-size: 12px;
  word-break: break-word;
}

.sa-api-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.sa-oauth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sa-oauth-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.sa-oauth-sub {
  display: block;
  font-size: 12.5px;
  color: var(--sa-muted);
}

.sa-oauth-session-box {
  background: #f9f9fb;
  border: 1px solid #ececef;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}

.sa-oauth-session-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sa-oauth-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #16a34a;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.sa-adv-details {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #e8e8ec;
  font-size: 12.5px;
  color: var(--sa-muted);
}

.sa-adv-details summary {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}

.sa-adv-details summary:hover {
  color: var(--sa-brand);
}

.sa-adv-form {
  margin-top: 10px;
}

.sa-oauth-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sa-oauth-modal[hidden] {
  display: none !important;
}

.sa-oauth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 20, 0.48);
  backdrop-filter: blur(2px);
}

.sa-oauth-dialog {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid var(--sa-border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.sa-oauth-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #ececef;
  background: #fcfcfd;
}

.sa-oauth-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--sa-brand);
  letter-spacing: 0.04em;
}

.sa-oauth-dialog-head h3 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 800;
}

.sa-oauth-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--sa-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.sa-oauth-close:hover {
  background: #f2f2f5;
  color: var(--sa-ink);
}

.sa-oauth-body {
  padding: 20px 22px;
}

.sa-oauth-detect-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.sa-oauth-detect-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.sa-oauth-detect-box label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 6px;
}

.sa-oauth-detect-box input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #86efac;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #14532d;
  background: #ffffff;
}

.sa-oauth-perms {
  background: #f9f9fb;
  border: 1px solid #ececef;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}

.sa-oauth-perm-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--sa-ink-body);
}

.sa-oauth-perm-item input {
  margin-top: 3px;
  accent-color: var(--sa-brand);
}

.sa-oauth-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.sa-oauth-agree-btn {
  padding: 10px 22px;
  font-size: 14.5px;
}

.sa-oauth-ext-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f3;
  text-align: center;
  font-size: 12.5px;
  color: var(--sa-muted);
}

.sa-oauth-ext-row a:hover {
  color: var(--sa-brand);
  text-decoration: underline;
}

.sa-sig-code {
  font-size: 12px;
  color: var(--sa-brand);
  background: var(--sa-brand-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

.sa-pos-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.sa-pos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 4px;
}

.sa-pos-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--sa-border);
  border-radius: 10px;
  cursor: pointer;
}

.sa-pos-item img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.sa-pos-info {
  flex: 1;
  min-width: 0;
}

.sa-pos-info strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sa-pos-info small {
  color: var(--sa-muted);
  font-size: 12px;
}

.sa-pos-qty {
  width: 54px !important;
  padding: 6px !important;
  text-align: center;
  font-weight: 700;
  border: 1px solid #dedee4;
  border-radius: 6px;
}

.sa-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sa-auth-card {
  background: #ffffff;
  border: 1px solid var(--sa-border);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
}

.sa-auth-card h1 {
  margin: 8px 0;
  font-size: 22px;
  font-weight: 800;
}

.sa-auth-desc {
  color: var(--sa-muted);
  font-size: 13.5px;
  margin-bottom: 18px;
}

.sa-auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.sa-auth-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dedee4;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 14px;
}

.sa-auth-back {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--sa-muted);
}

.waybill-print-body {
  background: #e5e5ea;
  padding: 24px;
}

.waybill-toolbar {
  max-width: 420px;
  margin: 0 auto 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.waybill-sheet {
  background: #ffffff;
  max-width: 420px;
  margin: 0 auto;
  padding: 18px;
  border: 2px solid #000000;
  color: #000000;
  font-size: 12.5px;
}

.wb-head {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
}

.wb-head small {
  display: block;
  font-size: 11px;
}

.wb-channel-box {
  border: 2px solid #000;
  padding: 4px 8px;
  text-align: center;
}

.wb-channel-box span {
  display: block;
  font-size: 10px;
  font-weight: 700;
}

.wb-barcode-box {
  text-align: center;
  padding: 10px 0;
  border-bottom: 2px solid #000;
}

.wb-bars {
  font-size: 24px;
  letter-spacing: 2px;
  font-weight: 900;
}

.wb-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-bottom: 2px solid #000;
  padding: 10px 0;
}

.wb-party span {
  font-size: 10px;
  font-weight: 700;
  display: block;
}

.wb-party p {
  margin: 2px 0;
  font-size: 11.5px;
}

.wb-items table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}

.wb-items th, .wb-items td {
  border-bottom: 1px solid #000;
  padding: 4px;
  text-align: left;
  font-size: 11.5px;
}

.wb-cod-row {
  display: flex;
  justify-content: space-between;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 10px 0;
}

.wb-cod-row strong {
  display: block;
  font-size: 18px;
}

.wb-sign-box {
  border: 1px dashed #000;
  padding: 6px 12px;
  text-align: center;
}

.wb-note {
  padding-top: 8px;
  font-size: 11px;
}

@media print {
  .no-print { display: none !important; }
  .waybill-print-body { background: #fff; padding: 0; }
}

@media (max-width: 1024px) {
  .sa-shell {
    grid-template-columns: 1fr;
  }
  .sa-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #ececef;
  }
  .sa-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .sa-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sa-mid-grid,
  .sa-api-grid,
  .sa-drawer-grid,
  .sa-pos-layout {
    grid-template-columns: 1fr;
  }
  .sa-main {
    padding: 20px 16px;
  }
}
