﻿:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #687385;
  --line: #dfe4ea;
  --accent: #0f8b8d;
  --accent-dark: #0a696b;
  --accent-coral: #ff7855;
  --accent-sky: #55dcff;
  --accent-violet: #8b5cf6;
  --accent-amber: #f2b84b;
  --good: #137a4f;
  --warn: #a15c00;
  --bad: #b42318;
  --shadow: 0 10px 28px rgba(15, 30, 45, 0.08);
  --font-ui: system-ui, "Segoe UI", Arial, sans-serif;
  --sidebar-width: 216px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 400 0.875rem/1.5 var(--font-ui);
}

:where(button, input, select, textarea) {
  font: inherit;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}

.sidebar :focus-visible {
  outline-color: #9ff0e8;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 24px 18px;
  overflow-y: auto;
  color: #fff;
  background: #202833;
}

.brand {
  display: block;
  margin-bottom: 28px;
  font-size: 20px;
  font-weight: 700;
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.sidebar nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: #d8dee7;
  font-weight: 600;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar nav a.active {
  box-shadow: inset 3px 0 #49c4bc;
}

.sidebar-user {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-user strong {
  color: #fff;
}

.sidebar-user span,
.sidebar-user a {
  color: #d8dee7;
  font-size: 13px;
}

.sidebar-user button {
  width: 100%;
}

.shell {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  padding: 32px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 320px;
  padding: 42px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(32, 40, 51, 0.95), rgba(15, 139, 141, 0.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='360' viewBox='0 0 900 360'%3E%3Crect width='900' height='360' fill='%23202833'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.22'%3E%3Cpath d='M60 270h130l70-110 80 58 70-96 85 130 74-42 64-116 108 176h110' stroke-width='10'/%3E%3Ccircle cx='190' cy='270' r='18'/%3E%3Ccircle cx='260' cy='160' r='18'/%3E%3Ccircle cx='410' cy='122' r='18'/%3E%3Ccircle cx='633' cy='94' r='18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(460px, 100%);
}

.auth-panel h1 {
  margin: 0 0 18px;
  font-size: 34px;
}

.hero h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9ff0e8;
}

.quick-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 16px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  min-height: 42px;
}

.button.primary,
button.primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.button:hover,
button:hover {
  border-color: var(--accent);
}

.button.primary:hover,
button.primary:hover {
  background: var(--accent-dark);
}

.button.danger,
button.danger {
  color: #fff;
  border-color: var(--bad);
  background: var(--bad);
}

.button.danger:hover,
button.danger:hover {
  border-color: #b93831;
  background: #b93831;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

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

.tile,
.panel,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tile {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.tile strong {
  font-size: 18px;
}

.tile span,
.empty-text,
.message {
  color: var(--muted);
}

.panel {
  padding: 22px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 1.125rem;
}

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

.stat-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  font-size: 23px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sticky-horizontal-scroll {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  height: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.sticky-horizontal-scroll-inner {
  height: 1px;
}

.sticky-horizontal-scroll::-webkit-scrollbar {
  height: 14px;
}

.sticky-horizontal-scroll::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 10px;
}

.sticky-horizontal-scroll::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 10px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sales-table-scroll,
.products-table-scroll {
  padding-bottom: 12px;
}

.sales-table-scroll::-webkit-scrollbar,
.products-table-scroll::-webkit-scrollbar {
  height: 14px;
}

.sales-table-scroll::-webkit-scrollbar-thumb,
.products-table-scroll::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 10px;
}

.sales-table-scroll::-webkit-scrollbar-track,
.products-table-scroll::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 10px;
}

.products-table-scroll {
  overflow-y: visible;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

td.text-right,
.stat-card strong {
  font-variant-numeric: tabular-nums;
}

.sales-table th {
  position: sticky;
  top: 18px;
  z-index: 2;
  background: #fff;
}

.dashboard-product-profit-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.product-table th {
  position: sticky;
  top: 18px;
  z-index: 2;
  background: #fff;
}

.sales-table {
  width: 2000px;
  min-width: 1600px;
  table-layout: fixed;
}

.sales-table .col-order {
  width: 120px;
}

.sales-table .col-date {
  width: 150px;
}

.sales-table .col-barcode {
  width: 140px;
}

.sales-table .col-product {
  width: 520px;
}

.sales-table .col-sale-price {
  width: 120px;
}

.sales-table .col-cost,
.sales-table .col-commission {
  width: 110px;
}

.sales-table .col-cargo,
.sales-table .col-service,
.sales-table .col-rate {
  width: 100px;
}

.sales-table .col-profit {
  width: 120px;
}

.sales-table .col-status {
  width: 220px;
}

.sales-table .col-detail {
  width: 90px;
}

.product-table {
  width: 1740px;
  min-width: 1700px;
  table-layout: fixed;
}

.product-table .col-barcode {
  width: 150px;
}

.product-table .col-sku {
  width: 160px;
}

.product-table .col-product {
  width: 420px;
}

.product-table .col-category {
  width: 220px;
}

.product-table .col-commission {
  width: 130px;
}

.product-table .col-sale-price,
.product-table .col-margin {
  width: 120px;
}

.product-table .col-stock,
.product-table .col-vat {
  width: 90px;
}

.product-table .col-cost,
.product-table .col-packaging,
.product-table .col-labor,
.product-table .col-actions {
  width: 110px;
}

.dashboard-product-profit-table {
  width: 1460px;
  min-width: 940px;
  table-layout: fixed;
}

.dashboard-product-profit-table .col-barcode {
  width: 150px;
}

.dashboard-product-profit-table .col-sku {
  width: 150px;
}

.dashboard-product-profit-table .col-product {
  width: 520px;
}

.dashboard-product-profit-table .col-quantity {
  width: 80px;
}

.dashboard-product-profit-table .col-money {
  width: 120px;
}

.dashboard-product-profit-table .col-rate {
  width: 100px;
}

.dashboard-product-profit-table .col-status {
  width: 220px;
}

.compact-profit-table {
  min-width: 620px;
  table-layout: fixed;
}

.product-name-cell {
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fixed-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nowrap-cell,
.category-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-table .product-name-cell,
.dashboard-product-profit-table .product-name-cell {
  width: 520px;
}

.product-table .product-name-cell {
  max-width: 420px;
  width: 420px;
}

.sales-table .product-name-cell {
  max-width: 520px;
}

.compact-profit-table .product-name-cell {
  max-width: 360px;
  width: 360px;
}

.text-right {
  text-align: right;
  white-space: nowrap;
}

.text-center {
  text-align: center;
}

.status-cell {
  width: 220px;
  min-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-cell .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(15, 139, 141, 0.22);
  border-color: var(--accent);
}

.form-actions {
  align-items: end;
}

.upload-box {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-box input {
  max-width: 420px;
}

.sales-merge-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.sales-merge-heading h2 {
  margin-bottom: 8px;
}

.sales-merge-heading .helper-text {
  margin: 0;
}

.sales-calculate-button {
  min-width: 130px;
}

.sales-calculate-button:disabled,
.sales-import-slot button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.sales-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sales-import-slot {
  min-width: 0;
  padding: 20px 22px 20px 0;
}

.sales-import-slot + .sales-import-slot {
  border-left: 1px solid var(--line);
  padding-right: 0;
  padding-left: 22px;
}

.sales-import-slot h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.sales-import-slot .upload-box {
  align-items: stretch;
  flex-wrap: nowrap;
}

.sales-import-slot input[type="file"] {
  min-width: 0;
  width: 100%;
}

.sales-upload-state {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.sales-upload-state.success {
  color: var(--good);
  font-weight: 800;
}

.sales-upload-state.error {
  color: var(--bad);
  font-weight: 800;
}

.sales-merge-panel > .message {
  margin-bottom: 0;
}

.product-cost-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.product-cost-heading h2 {
  margin-bottom: 10px;
}

.product-cost-heading .helper-text {
  max-width: 760px;
  margin: 0;
}

.product-cost-heading .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.progress-bar {
  width: 100%;
  height: 12px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-bar.is-hidden {
  display: none;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.message.error {
  color: var(--bad);
  font-weight: 800;
}

.message.success {
  color: var(--good);
  font-weight: 800;
}

.helper-text {
  margin-top: -6px;
  color: var(--muted);
  font-size: 14px;
}

.sale-detail-row td {
  padding: 0;
  white-space: normal;
  background: #fbfcfd;
}

.sale-detail-box {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.sale-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.detail-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-item span,
.detail-notes {
  color: var(--muted);
  font-size: 13px;
}

.detail-item strong {
  font-size: 14px;
}

.detail-notes p {
  margin: 6px 0;
}

.settings-table-wrap {
  margin-top: 16px;
}

.settings-table {
  min-width: 1180px;
  table-layout: fixed;
}

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

.actions.text-center {
  justify-content: center;
}

.product-table .actions {
  gap: 6px;
}

.product-table .mini-button {
  min-width: 48px;
  padding: 7px 8px;
}

.table-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.table-filters input,
.table-filters select {
  height: 42px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.table-filters button {
  min-height: 42px;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
}

.sortable-header:hover {
  color: #0f8f8b;
}

.sortable-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.sortable-header.sort-asc,
.sortable-header.sort-desc {
  color: #0f8f8b;
  background: #eef9f8;
}

.sortable-header.sort-asc::after {
  content: " ▲";
}

.sortable-header.sort-desc::after {
  content: " ▼";
}

.table-meta {
  margin: 10px 0;
  color: #64748b;
  font-size: 14px;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

.pagination span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.mini-button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.mini-button.danger {
  color: #fff;
  border-color: var(--bad);
  background: var(--bad);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.good {
  color: var(--good);
  background: #e9f7f0;
}

.badge.warn {
  color: var(--warn);
  background: #fff4df;
}

.badge.bad {
  color: var(--bad);
  background: #fdecea;
}

.positive {
  color: var(--good);
  font-weight: 800;
}

.negative {
  color: var(--bad);
  font-weight: 800;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.result-list {
  display: grid;
  gap: 12px;
}

.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.result-list span {
  color: var(--muted);
  font-weight: 800;
}

.pricing-grid {
  align-items: start;
}

.pricing-product-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr);
  gap: 12px;
  margin-bottom: 16px;
}

.pricing-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pricing-result-card {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.pricing-result-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pricing-result-card strong {
  font-size: 17px;
}

.pricing-warning-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pricing-warning-list h3 {
  margin: 6px 0 0;
  font-size: 16px;
}

.pricing-warning-list p {
  margin: 0;
  padding: 11px 12px;
  border-radius: 8px;
  font-weight: 800;
}

.pricing-warning-list .warn {
  color: var(--warn);
  background: #fff4df;
}

.pricing-warning-list .bad {
  color: var(--bad);
  background: #fdecea;
}

.success-note {
  color: var(--good);
  background: #e9f7f0;
}

.warn-text {
  color: var(--warn);
}

.alert-panel {
  min-height: 190px;
}

.commission-memory-panel,
.commission-mismatch-panel {
  margin-top: 18px;
}

.alert-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.alert-section-heading h2 {
  margin: 2px 0 0;
}

.alert-detail-table {
  min-width: 1050px;
  table-layout: fixed;
}

.alert-detail-table th:nth-child(1) {
  width: 170px;
}

.alert-detail-table th:nth-child(2) {
  width: 210px;
}

.alert-detail-table th:nth-child(3) {
  width: 340px;
}

.alert-detail-table th:nth-child(4),
.alert-detail-table th:nth-child(5),
.alert-detail-table th:nth-child(6) {
  width: 130px;
}

.alert-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert-list li {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.alert-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .stats-grid,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .pricing-result-list {
    grid-template-columns: 1fr;
  }
}

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

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

  .shell {
    width: 100%;
    margin-left: 0;
    padding: 18px;
  }

  .hero,
  .page-header,
  .product-cost-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-cost-heading .button {
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 28px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .page-header h1 {
    font-size: 1.625rem;
  }

  .grid.two,
  .grid.three,
  .stats-grid,
  .form-grid,
  .table-filters,
  .pricing-product-picker {
    grid-template-columns: 1fr;
  }
}

/* Melontik'teki finansal akıştan uyarlanan dashboard görünümü */
.dashboard-shell {
  padding: 28px 30px 48px;
}

.dashboard-header {
  align-items: flex-end;
  margin-bottom: 18px;
}

.dashboard-header h1 {
  font-size: 34px;
}

.dashboard-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.dashboard-refresh span {
  font-size: 19px;
  line-height: 1;
}

.dashboard-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  width: 100%;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-date-fields,
.dashboard-presets {
  display: flex;
  align-items: end;
  gap: 9px;
}

.dashboard-date-fields label {
  min-width: 150px;
}

.dashboard-presets {
  flex-wrap: wrap;
}

.dashboard-period {
  margin: 0 0 10px auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

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

.dashboard-stat-card {
  display: grid;
  gap: 10px;
  min-height: 138px;
  padding: 17px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 30, 45, 0.06);
}

.dashboard-stat-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-stat-topline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-stat-topline i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  color: #0b5760;
  background: #dff8f8;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-stat-card > strong {
  overflow: hidden;
  font-size: 25px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-stat-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-stat-card.tone-coral { border-top-color: var(--accent-coral); }
.dashboard-stat-card.tone-coral .dashboard-stat-topline i { color: #a83f25; background: #ffe4dd; }
.dashboard-stat-card.tone-sky { border-top-color: #1aa9cd; }
.dashboard-stat-card.tone-sky .dashboard-stat-topline i { color: #09647b; background: #dff7fd; }
.dashboard-stat-card.tone-green { border-top-color: #28a56b; }
.dashboard-stat-card.tone-green .dashboard-stat-topline i { color: #137a4f; background: #e3f7ec; }
.dashboard-stat-card.tone-violet { border-top-color: var(--accent-violet); }
.dashboard-stat-card.tone-violet .dashboard-stat-topline i { color: #6338bb; background: #eee7ff; }
.dashboard-stat-card.tone-navy { border-top-color: #334155; }
.dashboard-stat-card.tone-navy .dashboard-stat-topline i { color: #27364b; background: #e6ebf1; }
.dashboard-stat-card.tone-amber { border-top-color: var(--accent-amber); }
.dashboard-stat-card.tone-amber .dashboard-stat-topline i { color: #855500; background: #fff2ce; }
.dashboard-stat-card.tone-danger { border-top-color: var(--bad); }
.dashboard-stat-card.tone-danger .dashboard-stat-topline i { color: var(--bad); background: #fdecea; }

.dashboard-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.dashboard-grid-primary {
  grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.35fr);
}

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

.dashboard-panel {
  min-width: 0;
  padding: 20px;
  box-shadow: 0 4px 18px rgba(15, 30, 45, 0.06);
}

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

.dashboard-panel-header h2 {
  margin: 2px 0 0;
  font-size: 19px;
}

.panel-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-total {
  color: var(--ink);
  font-size: 19px;
  white-space: nowrap;
}

.expense-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.expense-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #e8edf3;
}

.expense-donut-center {
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  padding: 12px;
  border-radius: 50%;
  background: #fff;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--line);
}

.expense-donut-center span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.expense-donut-center strong {
  max-width: 106px;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-legend {
  display: grid;
  gap: 3px;
}

.expense-legend-row {
  display: grid;
  grid-template-columns: 10px minmax(94px, 1fr) auto 52px;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1f4;
}

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

.expense-legend-row i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.expense-legend-row span,
.expense-legend-row small {
  color: var(--muted);
  font-size: 12px;
}

.expense-legend-row strong {
  font-size: 13px;
  white-space: nowrap;
}

.expense-legend-row small {
  text-align: right;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-swatch.revenue { background: #bdeef8; }
.legend-swatch.profit { background: var(--accent-coral); }

.profit-trend-chart {
  width: 100%;
  min-height: 280px;
  overflow: hidden;
}

.profit-trend-chart svg {
  display: block;
  width: 100%;
  height: 280px;
}

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

.chart-axis-label {
  fill: #7a8595;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
}

.chart-revenue-bar {
  fill: #bdeef8;
}

.chart-profit-line {
  fill: none;
  stroke: var(--accent-coral);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-profit-dot {
  fill: #fff;
  stroke: var(--accent-coral);
  stroke-width: 3;
}

.chart-profit-dot.is-negative {
  stroke: var(--bad);
}

.profit-flow {
  display: grid;
  gap: 8px;
}

.profit-flow-row {
  display: grid;
  gap: 7px;
}

.profit-flow-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.profit-flow-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profit-flow-row strong {
  font-size: 13px;
  white-space: nowrap;
}

.profit-flow-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf1f5;
}

.profit-flow-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.profit-flow-row:nth-child(2) .profit-flow-track i { background: #1aa9cd; }
.profit-flow-row:nth-child(3) .profit-flow-track i { background: var(--accent-violet); }
.profit-flow-row:nth-child(4) .profit-flow-track i { background: var(--accent-amber); }
.profit-flow-row:nth-child(5) .profit-flow-track i { background: var(--good); }
.profit-flow-row.is-negative .profit-flow-track i { background: var(--bad); }

.profit-flow-row > b {
  height: 10px;
  color: #a2abb7;
  font-size: 13px;
  line-height: 10px;
  text-align: center;
}

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

.dashboard-health-grid .metric-row {
  display: grid;
  align-content: space-between;
  min-height: 92px;
  padding: 14px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fafbfd;
}

.dashboard-health-grid .metric-row strong {
  margin-top: 10px;
  font-size: 18px;
}

.dashboard-metric-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.metric-list {
  display: grid;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f4;
}

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

.metric-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.metric-row strong {
  flex: 0 0 auto;
  font-size: 14px;
  white-space: nowrap;
}

.dashboard-ranking-grid {
  align-items: start;
}

.dashboard-product-panel {
  margin-top: 18px;
}

.dashboard-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 1280px) {
  .dashboard-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-period {
    width: 100%;
    margin: 0;
  }

  .dashboard-grid-primary {
    grid-template-columns: 1fr;
  }

  .expense-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .dashboard-grid-secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .dashboard-shell {
    padding: 18px;
  }

  .dashboard-header {
    align-items: flex-start;
  }

  .dashboard-header h1 {
    font-size: 30px;
  }

  .dashboard-refresh {
    width: 100%;
    justify-content: center;
  }

  .dashboard-toolbar,
  .dashboard-date-fields,
  .dashboard-presets {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .dashboard-date-fields label {
    min-width: 0;
  }

  .dashboard-summary-grid,
  .dashboard-metric-groups,
  .dashboard-health-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-card {
    min-height: 126px;
  }

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

  .expense-legend {
    width: 100%;
  }

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

  .chart-legend {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .dashboard-stat-card > strong {
    font-size: 22px;
  }

  .expense-legend-row {
    grid-template-columns: 10px minmax(80px, 1fr) auto;
  }

  .expense-legend-row small {
    display: none;
  }
}

/* Ürün komisyon tarifesi ve kârlılık karşılaştırması */
.commission-analysis-shell {
  padding: 28px 30px 48px;
}

.commission-page-header {
  align-items: flex-end;
}

.commission-page-header h1 {
  font-size: 34px;
}

.commission-page-subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.commission-header-actions,
.commission-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.commission-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.commission-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.commission-summary-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 3px solid #334155;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 30, 45, 0.05);
}

.commission-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.commission-summary-card strong {
  font-size: 24px;
}

.commission-summary-card.tone-sky { border-top-color: #1aa9cd; }
.commission-summary-card.tone-amber { border-top-color: var(--accent-amber); }
.commission-summary-card.tone-green { border-top-color: var(--good); }
.commission-summary-card.tone-violet { border-top-color: var(--accent-violet); }
.commission-summary-card.tone-navy { border-top-color: #334155; }

.commission-upload-panel,
.commission-scenario-panel,
.commission-table-panel {
  margin-top: 18px;
  box-shadow: 0 4px 18px rgba(15, 30, 45, 0.05);
}

.commission-upload-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 18px 28px;
}

.commission-upload-panel h2,
.commission-section-heading h2 {
  margin: 3px 0 0;
  font-size: 19px;
}

.commission-upload-panel .message,
.commission-upload-panel .progress-bar {
  grid-column: 1 / -1;
  margin-top: 0;
}

.commission-scenario-panel > .helper-text {
  margin: 8px 0 16px;
}

.commission-scenario-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.commission-scenario-setting {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfd;
}

.commission-scenario-setting strong {
  grid-column: 1 / -1;
  font-size: 14px;
}

.commission-scenario-setting input {
  min-width: 0;
}

.commission-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 0.8fr));
  gap: 12px;
  margin: 18px 0 12px;
}

.commission-filter-actions {
  grid-column: span 2;
}

.commission-table-scroll {
  padding-bottom: 12px;
}

.commission-table-scroll::-webkit-scrollbar {
  height: 14px;
}

.commission-table-scroll::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #9ca3af;
}

.commission-table-scroll::-webkit-scrollbar-track {
  border-radius: 10px;
  background: #e5e7eb;
}

.commission-analysis-table {
  width: 2560px;
  min-width: 2560px;
  table-layout: fixed;
}

.commission-analysis-table .col-product { width: 340px; }
.commission-analysis-table .col-stock { width: 80px; }
.commission-analysis-table .col-current,
.commission-analysis-table .col-cost,
.commission-analysis-table .col-current-rate { width: 115px; }
.commission-analysis-table .col-scenario { width: 250px; }
.commission-analysis-table .col-manual { width: 260px; }
.commission-analysis-table .col-selected { width: 210px; }

.commission-analysis-table th {
  position: sticky;
  top: 18px;
  z-index: 2;
  background: #fff;
}

.commission-analysis-table td {
  vertical-align: top;
}

.commission-product-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
  white-space: normal;
}

.commission-product-cell strong,
.commission-product-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-product-cell strong {
  font-size: 14px;
  line-height: 1.35;
}

.commission-product-cell span {
  color: var(--muted);
  font-size: 11px;
}

.commission-product-cell .commission-cost-warning {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--warn);
  background: #fff4df;
  font-weight: 800;
}

.commission-offer {
  display: grid;
  gap: 8px;
  min-height: 224px;
  padding: 11px;
  border: 1px solid #e2e7ed;
  border-radius: 8px;
  background: #fafbfd;
  white-space: normal;
}

.commission-offer.is-best {
  border-color: #63b892;
  background: #f0faf5;
  box-shadow: inset 0 3px 0 #28a56b;
}

.commission-offer.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.commission-offer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.commission-offer-heading strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-offer-heading span {
  flex: 0 0 auto;
  padding: 3px 5px;
  border-radius: 5px;
  color: var(--good);
  background: #dff3e9;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.commission-offer-range {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid #dbe4ea;
  border-radius: 6px;
  background: #fff;
}

.commission-offer-range span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.commission-offer-range strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-offer dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.commission-offer dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.commission-offer dt,
.commission-offer small {
  color: var(--muted);
  font-size: 10px;
}

.commission-offer > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-offer dd {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.commission-margin {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 5px;
}

.commission-margin.good { color: var(--good); background: #e9f7f0; }
.commission-margin.warn { color: var(--warn); background: #fff4df; }
.commission-margin.bad { color: var(--bad); background: #fdecea; }

.commission-offer .mini-button {
  width: 100%;
  margin-top: auto;
}

.commission-offer .mini-button.primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.commission-manual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  white-space: normal;
}

.commission-manual label {
  font-size: 10px;
}

.commission-manual input {
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
}

.commission-manual > .mini-button,
.commission-manual-result {
  grid-column: 1 / -1;
}

.commission-manual-result {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfd;
}

.commission-manual-result span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
}

.commission-selection {
  display: grid;
  gap: 8px;
  white-space: normal;
}

.commission-selection .badge {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-selection small {
  color: var(--muted);
  font-size: 11px;
}

.commission-pagination {
  flex-wrap: wrap;
}

.commission-pagination label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.commission-pagination select {
  width: 78px;
}

@media (max-width: 1280px) {
  .commission-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .commission-filters {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 820px) {
  .commission-analysis-shell {
    padding: 18px;
  }

  .commission-page-header,
  .commission-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .commission-page-header h1 {
    font-size: 30px;
  }

  .commission-header-actions,
  .commission-header-actions .button {
    width: 100%;
  }

  .commission-header-actions .button {
    text-align: center;
  }

  .commission-summary-grid,
  .commission-scenario-settings,
  .commission-filters,
  .commission-upload-panel {
    grid-template-columns: 1fr;
  }

  .commission-filter-actions,
  .commission-upload-panel .message,
  .commission-upload-panel .progress-bar {
    grid-column: 1;
  }
}


@media (max-width: 820px) {
  .sales-merge-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-import-grid {
    grid-template-columns: 1fr;
  }

  .sales-import-slot,
  .sales-import-slot + .sales-import-slot {
    padding: 18px 0;
  }

  .sales-import-slot + .sales-import-slot {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .sales-import-slot .upload-box {
    flex-wrap: wrap;
  }

  .sales-calculate-button {
    width: 100%;
  }
}

.sales-workspace h2,
.sales-imports h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  line-height: 1.3;
}

.sales-imports {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.sales-imports > summary,
.sales-advanced-filters > summary {
  width: fit-content;
  padding: 8px 6px;
  color: var(--accent-dark);
  font-weight: 600;
  cursor: pointer;
}

.sales-imports[open] {
  padding-bottom: 16px;
}

.sales-imports > section {
  margin-top: 12px;
  padding: 14px 0 0;
}

.sales-imports .sales-upload-state {
  overflow-wrap: anywhere;
}

.sales-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 12rem) auto;
  gap: 8px;
}

.sales-toolbar > * {
  min-width: 0;
}

.sales-toolbar button[aria-pressed="true"] {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: #edf8f7;
}

.sales-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
}

.sales-advanced-filters {
  flex: 1;
  min-width: 0;
}

.sales-filter-row > button {
  min-height: 38px;
  padding: 7px 10px;
  border-color: transparent;
  background: transparent;
}

.sales-workspace .sticky-horizontal-scroll[hidden],
.sales-pagination[hidden] {
  display: none;
}

.sales-workspace .sales-table-scroll {
  padding-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.sales-workspace .sales-table :is(th, td) {
  padding: 9px 10px;
}

.sales-workspace .sales-table th {
  background: #f2f5f6;
}

.sales-workspace .sales-table .sortable-header:is(.sort-asc, .sort-desc) {
  color: var(--accent-dark);
  background: #e6f4f2;
}

.sales-workspace .sales-table tbody tr:not(.sale-detail-row):hover {
  background: #f6faf9;
}

.sales-workspace .detail-item strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.sales-product-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-mobile-order {
  display: none;
}

.sales-workspace[data-view="summary"] .sales-table {
  width: 100%;
  min-width: 0;
}

.sales-workspace[data-view="summary"] .sales-table :is(col, th, td:not([colspan])):is(:nth-child(3), :nth-child(n+6):nth-child(-n+9), :nth-child(11)) {
  display: none;
}

.sales-workspace[data-view="summary"] .col-date { width: 164px; }
.sales-workspace[data-view="summary"] .col-product { width: auto; }
.sales-workspace[data-view="summary"] .col-sale-price,
.sales-workspace[data-view="summary"] .col-profit { width: 106px; }
.sales-workspace[data-view="summary"] .col-status { width: 160px; }
.sales-workspace[data-view="summary"] .col-detail { width: 78px; }

.sales-workspace[data-view="summary"] .sales-table :is(.product-name-cell, .status-cell) {
  width: auto;
  min-width: 0;
}

.sales-workspace[data-view="summary"] .status-cell .badge {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.sales-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.sales-pagination button:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 1100px) {
  .sales-workspace[data-view="summary"] .sales-table :is(col, th, td:not([colspan])):nth-child(2) {
    display: none;
  }

  .sales-workspace[data-view="summary"] .col-order { width: 18%; }
  .sales-workspace[data-view="summary"] .col-sale-price,
  .sales-workspace[data-view="summary"] .col-profit { width: 14%; }
  .sales-workspace[data-view="summary"] .col-status { width: 23%; }
  .sales-workspace[data-view="summary"] .col-detail { width: 68px; }
}

@media (max-width: 820px) {
  body[data-page="sales"] .sidebar {
    padding: 10px 14px;
  }

  body[data-page="sales"] .sidebar .brand {
    margin-bottom: 6px;
  }

  body[data-page="sales"] .sidebar nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
  }

  body[data-page="sales"] .sidebar-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
  }

  body[data-page="sales"] .sidebar-user button { width: auto; }
  body[data-page="sales"] .shell { padding: 14px; }
}

@media (max-width: 620px) {
  .sales-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sales-toolbar input {
    grid-column: 1 / -1;
  }

  .sales-workspace[data-view="summary"] .sales-table :is(col, th, td:not([colspan])):is(:nth-child(1), :nth-child(5)) {
    display: none;
  }

  .sales-workspace[data-view="summary"] .col-profit { width: 23%; }
  .sales-workspace[data-view="summary"] .col-status { width: 27%; }
  .sales-workspace[data-view="summary"] .col-detail { width: 60px; }

  .sales-workspace[data-view="summary"] .sales-table :is(th, td) {
    padding-inline: 6px;
  }

  .sales-workspace[data-view="summary"] .sales-table th {
    white-space: normal;
  }

  .sales-workspace[data-view="summary"] .sales-product-label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sales-workspace[data-view="summary"] .sales-mobile-order {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sales-workspace[data-view="summary"] .status-cell .badge {
    padding: 3px 4px;
    border-radius: 5px;
    font-weight: 600;
    overflow-wrap: break-word;
  }

  .sales-workspace[data-view="summary"] .mini-button {
    min-height: 44px;
    padding-inline: 5px;
  }
}

