:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  color-scheme: light;
  --bg: #edf2f5;
  --bg-soft: #f7fafb;
  --surface: #ffffff;
  --surface-soft: #f5f8fa;
  --surface-strong: #e8eef2;
  --ink: #101418;
  --ink-soft: #2f3a45;
  --muted: #687684;
  --muted-strong: #465463;
  --line: #d9e2e8;
  --line-strong: #bcc9d3;
  --nav: #101615;
  --nav-soft: #18201f;
  --accent: #0f9488;
  --accent-strong: #0b6f66;
  --blue: #2563eb;
  --amber: #d97706;
  --danger: #d92d20;
  --success: #15803d;
  --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.08);
  --shadow-md: 0 14px 36px rgba(16, 20, 24, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(237, 242, 245, 0.96), rgba(248, 250, 251, 0.98) 46%, rgba(232, 242, 239, 0.94));
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#root {
  min-height: 0;
}

a {
  color: inherit;
}

/* App shell */
.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 27px 13px 12px;
  background:
    radial-gradient(circle at 0 0, rgba(16, 104, 255, 0.22), transparent 38%),
    linear-gradient(180deg, #061a33 0%, #031225 58%, #061b34 100%);
  color: #f7fbff;
  border-right: 1px solid rgba(71, 129, 210, 0.35);
  box-shadow: 18px 0 42px rgba(0, 21, 52, 0.2);
}

.sidebar-toggle {
  width: 30px;
  min-height: 30px;
  padding: 0;
  flex: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
}

.sidebar-toggle:hover {
  border-color: var(--accent);
  background: #eef7ff;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
  padding: 18px 9px 10px;
}

.sidebar-collapsed .brand-block,
.sidebar-collapsed .nav-section-title,
.sidebar-collapsed .sidebar-nav a span,
.sidebar-collapsed .user-meta {
  display: none;
}

.sidebar-collapsed .nav-section + .nav-section {
  margin-top: 8px;
}

.sidebar-collapsed .sidebar-nav a {
  justify-content: center;
  min-height: 43px;
  padding: 10px;
}

.sidebar-collapsed .nav-icon {
  width: 22px;
  height: 22px;
}

.sidebar-collapsed .user-box {
  display: flex;
  flex-direction: column;
  padding: 10px 0 0;
}

.sidebar-collapsed .user-box button {
  width: 43px;
  overflow: hidden;
  gap: 0;
  padding: 10px 13px;
  color: transparent;
}

.sidebar-collapsed .user-box button svg {
  flex-shrink: 0;
  color: #eaf4ff;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 0 8px 24px;
  border-bottom: 0;
}

.brand-logo-surface {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(214, 229, 247, 0.88);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 14px 30px rgba(0, 18, 48, 0.22);
}

.brand-logo-surface.large {
  width: min(390px, 100%);
  min-height: 92px;
  padding: 15px 18px;
  box-shadow: 0 22px 48px rgba(0, 18, 48, 0.18);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 46px;
  object-fit: contain;
}

.brand-logo-surface.large .brand-logo {
  max-height: 64px;
}

.brand-mark {
  width: 47px;
  height: 47px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0d7cff, #075ed9);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(5, 111, 239, 0.34);
}

.brand-mark.large {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.brand-block h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-block p {
  margin: 0;
  color: rgba(235, 244, 255, 0.8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.nav-section + .nav-section {
  margin-top: 21px;
}

.nav-section-title {
  padding: 0 10px 8px;
  color: rgba(232, 241, 255, 0.56);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 43px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(235, 244, 255, 0.84);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(30, 123, 255, 0.16);
}

.sidebar-nav a.active {
  color: #ffffff;
  background: linear-gradient(90deg, #0877ff, #055edc);
  box-shadow: 0 12px 24px rgba(7, 112, 243, 0.28);
}

.nav-icon {
  flex-shrink: 0;
  color: currentColor;
}

.user-box {
  display: grid;
  grid-template-columns: 41px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 16px 8px 8px;
  border-top: 1px solid rgba(204, 224, 255, 0.14);
}

.user-avatar {
  width: 41px;
  height: 41px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 800;
}

.user-meta {
  min-width: 0;
}

.user-meta strong,
.user-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta span {
  color: rgba(235, 244, 255, 0.58);
  font-size: 12px;
}

.user-box button {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 8px;
  border-color: rgba(174, 207, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #eaf4ff;
}

.main-shell {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(188, 201, 211, 0.72);
  backdrop-filter: blur(16px);
}

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

.topbar-kicker,
.section-eyebrow {
  display: inline-block;
  margin-bottom: 3px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.topbar-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
}

.status-pill.ready {
  border-color: rgba(15, 148, 136, 0.28);
  background: rgba(15, 148, 136, 0.1);
  color: var(--accent-strong);
}

.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px 32px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.content-inner {
  width: min(100%, 1480px);
  min-height: 0;
  margin: 0 auto;
}

/* Page structure */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.page-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.page-header p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.hero-header {
  align-items: flex-end;
}

.header-stack {
  min-width: 178px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
}

.header-stack span,
.header-stack strong {
  display: block;
}

.header-stack span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.header-stack strong {
  color: var(--ink);
  font-size: 15px;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px;
  background:
    linear-gradient(135deg, rgba(16, 22, 21, 0.98) 0%, rgba(24, 32, 31, 0.98) 48%, rgba(237, 242, 245, 1) 48.2%),
    var(--bg);
}

.login-stage {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 38px;
  align-items: center;
}

.app-loading-card {
  width: min(390px, calc(100vw - 44px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(214, 229, 247, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 56px rgba(0, 18, 48, 0.2);
  text-align: center;
}

.app-loading-card strong {
  color: var(--ink);
  font-size: 18px;
}

.app-loading-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-brand-panel {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.login-logo-group {
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: flex-start;
}

.login-logo-group p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-brand-panel h1 {
  margin: 14px 0 10px;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: 0;
}

.login-brand-panel p {
  max-width: 480px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
}

.login-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
}

.login-signal-grid div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.login-signal-grid span,
.login-signal-grid strong {
  display: block;
}

.login-signal-grid span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 750;
}

.login-signal-grid strong {
  margin-top: 3px;
  font-size: 17px;
}

.login-card {
  width: 100%;
  padding: 30px;
  border: 1px solid rgba(188, 201, 211, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-card p.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

/* Forms and controls */
.field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(16, 20, 24, 0.02);
}

input[type='checkbox'] {
  min-width: 16px;
  width: 16px;
  min-height: 16px;
  height: 16px;
  accent-color: var(--accent);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 148, 136, 0.14);
}

button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, var(--shadow-sm);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(16, 20, 24, 0.1);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink-soft);
}

button.danger {
  background: var(--danger);
  color: #ffffff;
}

.icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 6px;
}

.danger-lite {
  border-color: rgba(217, 45, 32, 0.24);
  background: rgba(217, 45, 32, 0.08);
  color: var(--danger);
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  margin: 8px 0 0;
}

.scan-message,
.pos-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
}

.scan-message.info {
  border-color: rgba(15, 148, 136, 0.24);
  background: rgba(15, 148, 136, 0.1);
  color: var(--accent-strong);
}

.scan-message.warning {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(217, 119, 6, 0.1);
  color: #9a5b00;
}

.pos-message.warning {
  min-height: 55px;
  border-color: rgba(246, 153, 45, 0.34);
  border-radius: 8px;
  background: #fff8ed;
  color: #b45400;
  font-size: 14px;
}

.pos-sync-message {
  justify-content: space-between;
}

.pos-sync-message span {
  flex: 1;
}

.pos-sync-message button {
  min-height: 34px;
  padding: 6px 12px;
}

.scan-message.error,
.pos-message.error {
  border-color: rgba(217, 45, 32, 0.24);
  background: rgba(217, 45, 32, 0.08);
  color: #a21d13;
}

.pos-message.success {
  border-color: rgba(21, 128, 61, 0.22);
  background: rgba(21, 128, 61, 0.09);
  color: var(--success);
}

/* Data surfaces */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f5;
  color: var(--ink-soft);
  font-size: 13px;
  vertical-align: middle;
}

th {
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

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

tbody tr:hover td {
  background: #fbfcfd;
}

.empty-table-cell {
  text-align: center;
  color: var(--muted);
  padding: 34px 16px;
}

.pos-table .empty-table-cell {
  height: 488px;
  padding: 18px;
}

.cart-empty-state {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #ffffff;
}

.cart-empty-icon {
  width: 79px;
  height: 79px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef5ff;
  color: #347dff;
}

.cart-empty-state strong {
  display: block;
  color: #0d1b39;
  font-size: 17px;
  font-weight: 900;
}

.cart-empty-state span {
  display: block;
  color: #74839c;
  font-size: 13px;
}

.card {
  min-width: 0;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

.management-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.elevated-card,
.command-card {
  border-color: rgba(188, 201, 211, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 252, 0.94)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(16, 20, 24, 0.08);
}

.command-card {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.command-card input,
.command-card select {
  flex: 1;
}

.compact-command-card {
  justify-content: flex-start;
}

.search-command-card {
  align-items: center;
}

.search-command-card svg {
  flex-shrink: 0;
  color: var(--muted);
}

.result-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: -6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-strip strong {
  color: var(--ink);
  font-size: 13px;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.wrap-form {
  flex-wrap: wrap;
}

.grow-field {
  flex: 1;
  min-width: 180px;
}

.soft-divider {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.card-title,
.section-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.section-title {
  margin-top: 4px;
}

.form-total {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.spaced-table {
  margin-top: 16px;
}

.balance-positive {
  color: var(--success);
  font-weight: 850;
}

.balance-negative {
  color: var(--danger);
  font-weight: 850;
}

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

@media (max-width: 1366px), (max-height: 800px) {
  body {
    font-size: 13px;
  }

  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 10px 10px;
  }

  .brand-block {
    gap: 6px;
    padding: 0 6px 14px;
  }

  .brand-logo-surface {
    min-height: 48px;
    padding: 7px 9px;
  }

  .brand-logo {
    max-height: 38px;
  }

  .brand-block p {
    font-size: 10px;
    line-height: 1.2;
  }

  .nav-section + .nav-section {
    margin-top: 12px;
  }

  .nav-section-title {
    padding: 0 8px 5px;
    font-size: 10px;
  }

  .sidebar-nav a {
    min-height: 36px;
    gap: 9px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .user-box {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 6px 6px;
  }

  .user-avatar {
    width: 34px;
    height: 34px;
  }

  .user-box button {
    min-height: 34px;
    margin-top: 4px;
    padding: 6px 10px;
  }

  .topbar {
    height: 58px;
    padding: 0 20px;
  }

  .topbar-title {
    font-size: 16px;
  }

  .content {
    padding: 18px 20px;
  }

  .page-header {
    gap: 12px;
    margin-bottom: 14px;
  }

  .page-header h2 {
    font-size: 24px;
  }

  .card {
    margin-bottom: 12px;
    padding: 14px;
  }

  .command-card {
    padding: 12px;
  }

  th,
  td {
    padding: 9px 10px;
    font-size: 12px;
  }

  .form-grid {
    gap: 10px 12px;
  }

  .metric-card {
    min-height: 112px;
    padding: 14px;
  }
}

.line-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(90px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

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

.badge.draft {
  background: rgba(217, 119, 6, 0.1);
  color: #9a5b00;
}

.badge.posted {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

.badge.cancelled {
  background: rgba(217, 45, 32, 0.09);
  color: var(--danger);
}

/* Dashboard */
.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.compact-metrics {
  margin-bottom: 16px;
}

.compact-metrics .metric-card {
  min-height: 108px;
}

.metric-card,
.action-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  min-height: 130px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--accent);
}

.metric-card.primary {
  border-top-color: var(--blue);
}

.metric-card.warning {
  border-top-color: var(--amber);
}

.metric-card.success {
  border-top-color: var(--success);
}

.metric-card span,
.metric-card small,
.action-kicker,
.action-tile small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
}

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

.action-tile {
  min-height: 142px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: var(--ink);
}

.action-tile:hover {
  border-color: rgba(15, 148, 136, 0.44);
  box-shadow: 0 16px 28px rgba(16, 20, 24, 0.1);
}

.action-tile strong {
  display: block;
  margin: 9px 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.action-tile.spotlight {
  background: #14201f;
  color: #ffffff;
  border-color: #14201f;
}

.action-tile.spotlight .action-kicker,
.action-tile.spotlight small {
  color: rgba(255, 255, 255, 0.64);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
}

.owner-radar-grid,
.device-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

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

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

.dashboard-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.device-health-card,
.price-queue-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.device-health-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.device-health-card dl div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(214, 224, 235, 0.78);
}

.device-health-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.device-health-card dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.device-panel {
  display: flex;
  min-height: 360px;
  flex-direction: column;
}

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

.device-panel button {
  margin-top: auto;
}

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

.panel-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.panel-heading a {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

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

.payment-mix,
.ops-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.payment-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.payment-row strong,
.payment-row span {
  display: block;
}

.payment-row strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.payment-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.payment-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef2;
}

.payment-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.ops-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.ops-item strong {
  color: var(--ink);
}

.ops-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.ops-item.good {
  border-color: rgba(21, 128, 61, 0.18);
  background: rgba(21, 128, 61, 0.07);
}

.ops-item.warn {
  border-color: rgba(217, 119, 6, 0.2);
  background: rgba(217, 119, 6, 0.08);
}

.stock-alert-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(217, 45, 32, 0.08);
  color: var(--danger);
  font-size: 11px;
  font-weight: 850;
}

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

/* POS / Satış ekranı */
.pos-workspace-shell {
  grid-template-columns: 250px minmax(0, 1fr);
  background: #f5f8fc;
}

.pos-workspace-shell .topbar {
  display: none;
}

.pos-workspace-shell .content {
  overflow: auto;
  padding: 27px 18px 28px;
  background: #f5f8fc;
}

.pos-workspace-shell .content-inner {
  width: 100%;
  max-width: none;
}

.pos-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 55px);
  min-height: 0;
  overflow: hidden;
  color: #0c1a38;
}

.fintech-pos {
  gap: 13px;
}

.pos-command-bar {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) minmax(492px, 492px);
  gap: 21px;
  align-items: stretch;
  padding: 0 0 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.pos-search-cluster {
  display: grid;
  grid-template-columns: 92px minmax(310px, 1fr) 78px 84px 109px 104px;
  gap: 8px;
  align-items: stretch;
  min-height: 64px;
}

.price-tier-select,
.pos-input-wrap,
.pos-action-button {
  height: 64px;
  border-radius: 8px;
}

.price-tier-select {
  border-color: #d8e3ef;
  background: #ffffff;
  color: #465b78;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(18, 52, 89, 0.05);
}

.pos-input-wrap {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d8e3ef;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(18, 52, 89, 0.05);
}

.pos-input-wrap svg {
  color: #0d234b;
}

.pos-barcode-input {
  width: 100%;
  min-height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #33445f;
  font-size: 15px;
  font-weight: 650;
  box-shadow: none;
}

.pos-action-button {
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 8px 10px;
  border: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 22px rgba(20, 93, 204, 0.18);
}

.pos-action-button small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-action-button:disabled {
  opacity: 1;
  cursor: default;
}

.action-search {
  background: linear-gradient(180deg, #0877ff, #075ed6);
}

.action-price {
  background: linear-gradient(180deg, #26c36b, #14a84f);
}

.action-print {
  background: linear-gradient(180deg, #ffb955, #fb8f1a);
}

.action-payment {
  background: linear-gradient(180deg, #167aff, #075edc);
}

.fintech-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.fintech-totals label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: #0d1b39;
  font-size: 13px;
  font-weight: 800;
}

.fintech-totals input,
.fintech-totals strong {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 13px;
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  background: #ffffff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(18, 52, 89, 0.05);
}

.paid-value {
  color: #0d1b39;
}

.fintech-totals input::placeholder {
  color: #0d1b39;
  opacity: 1;
}

.total-value {
  color: #e80000;
}

.change-value {
  color: #047b13;
}

.pos-fintech-board {
  display: grid;
  grid-template-columns: minmax(610px, 1fr) minmax(520px, 520px);
  gap: 13px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.pos-product-panel,
.pos-checkout-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  border: 1px solid #e3ebf5;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(12, 38, 79, 0.08);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.pos-product-panel {
  padding: 18px 13px 12px;
}

.pos-checkout-panel {
  padding: 23px 13px 14px;
}

.product-toolbar {
  display: grid;
  grid-template-columns: 155px minmax(170px, 1fr) minmax(190px, 268px) 82px;
  gap: 13px;
  align-items: start;
  margin-bottom: 23px;
}

.product-count {
  min-height: 48px;
}

.product-count strong,
.product-count span {
  display: block;
}

.product-count strong {
  color: #0c1a38;
  font-size: 20px;
  line-height: 1.2;
}

.product-count > span {
  margin-top: 5px;
  color: #0c1a38;
  font-size: 22px;
  line-height: 1;
}

.info-dot {
  display: inline-flex !important;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #19bbd2;
  color: #ffffff;
  font-size: 10px !important;
  font-weight: 900;
}

.misc-amount-control,
.discount-control,
.customer-select-row {
  display: grid;
  min-width: 0;
}

.misc-amount-control {
  grid-template-columns: minmax(150px, 1fr) 50px;
}

.discount-control {
  grid-template-columns: minmax(150px, 1fr) 60px;
}

.misc-amount-control input,
.discount-control input,
.discount-control select,
.customer-select-row select {
  min-height: 45px;
  border-color: #d9e2ee;
  border-radius: 7px;
  color: #566a85;
  font-weight: 650;
}

.misc-amount-control button {
  min-height: 45px;
  border-radius: 0 7px 7px 0;
  background: #e7f3ff;
  color: #0277f0;
  box-shadow: none;
}

.more-button {
  min-height: 45px;
  border-color: #d9e2ee;
  background: #f3f6fa;
  color: #273a59;
  box-shadow: none;
}

.compact-basket-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 46px;
  margin: 0 8px 15px;
}

.compact-basket-tabs button {
  min-height: 56px;
  padding: 9px 12px;
  border: 0;
  border-radius: 3px;
  background: #ffffff;
  color: #203251;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.35;
}

.compact-basket-tabs button.active {
  background: linear-gradient(180deg, #1688ff, #086ce8);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(10, 117, 248, 0.22);
}

.pos-table {
  border-color: #dfe7f0;
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(12, 38, 79, 0.04);
}

.pos-table th,
.pos-table td {
  height: 52px;
  padding: 9px 14px;
  border-color: #e7edf4;
  color: #0d1b39;
  font-size: 13px;
}

.pos-table th {
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
}

.trash-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #ff2a6b;
  box-shadow: none;
  font-size: 16px;
}

.qty-input {
  width: 78px;
}

.customer-select-row {
  grid-template-columns: minmax(0, 1fr) 58px 61px;
  gap: 5px;
}

.customer-select-row select {
  border-color: #d9e2ee;
  background: #ffffff;
}

.select-customer-button,
.chart-button {
  min-height: 45px;
  border-radius: 7px;
  color: #ffffff;
  box-shadow: none;
}

.select-customer-button {
  background: #0877ff;
}

.chart-button {
  border: 1px solid #ffc46a;
  background: #fff8ed;
  color: #f18a00;
  font-size: 12px;
}

.customer-detail-strip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  min-height: 28px;
  margin: 14px 0 13px;
  color: #202938;
}

.customer-detail-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  background: #f8fafc;
  font-size: 13px;
}

.customer-detail-strip strong {
  font-size: 12px;
}

.customer-detail-strip button {
  min-height: 28px;
  padding: 4px 0;
  background: transparent;
  color: #0d1b39;
  box-shadow: none;
  font-size: 12px;
}

.quick-amounts,
.fintech-quick-amounts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.fintech-quick-amounts button {
  min-height: 47px;
  border: 1px solid #d6e8fb;
  border-radius: 6px;
  background: #eef6ff;
  color: #0877ff;
  box-shadow: none;
  font-size: 16px;
}

.pos-payment-buttons,
.fintech-payment-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.pos-payment-buttons button {
  min-height: 118px;
  flex-direction: column;
  gap: 5px;
  padding: 18px 8px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  text-align: center;
  box-shadow: none;
}

.pos-payment-buttons button:disabled {
  opacity: 0.88;
}

.pos-payment-buttons strong {
  display: block;
  font-size: 15px;
  line-height: 1.1;
}

.payment-key {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 900;
}

.payment-cash {
  background: linear-gradient(180deg, #32c976, #18a653);
}

.payment-card {
  background: linear-gradient(180deg, #20c1cf, #16a2ba);
}

.payment-account {
  background: linear-gradient(180deg, #ffb42d, #fa9212);
}

.payment-split {
  background: linear-gradient(180deg, #238cff, #0a6fea);
}

.payment-other {
  background: linear-gradient(180deg, #ff3f44, #ef272f);
}

.split-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

.fintech-split-panel {
  margin-top: 10px;
}

.split-panel .field {
  margin-bottom: 10px;
}

.product-list-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-top: 20px;
}

.product-list-tabs button {
  min-height: 41px;
  border: 1px solid #dbe5ef;
  border-radius: 6px;
  background: #ffffff;
  color: #203251;
  box-shadow: none;
  font-weight: 650;
}

.product-list-tabs button.active {
  background: linear-gradient(180deg, #1688ff, #086ce8);
  color: #ffffff;
  border-color: #1688ff;
}

.quick-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 13px;
}

.quick-product-grid button {
  min-height: 85px;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  padding: 12px;
  border: 1px solid #dce6f0;
  border-radius: 6px;
  background: #ffffff;
  color: #0d1b39;
  box-shadow: none;
  text-align: left;
}

.quick-product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dce6f0;
  border-radius: 7px;
  background: #fff;
}

.quick-product-card .quick-product-sale-button {
  width: 100%;
  border: 0;
  border-radius: 0;
}

.quick-product-card.is-favorite {
  border-color: #15936f;
  background: #effcf7;
}

.quick-product-image {
  width: 100%;
  height: 62px;
  border-radius: 5px;
  object-fit: cover;
}

.quick-image-picker {
  display: block;
  padding: 6px 8px;
  border-top: 1px solid #dce6f0;
  color: #1565c0;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.quick-image-picker input {
  display: none;
}

.quick-product-grid button:hover:not(:disabled) {
  border-color: #1788f5;
  background: #eef7ff;
}

.quick-product-grid strong,
.quick-product-grid span {
  display: block;
  max-width: 100%;
}

.product-catalog-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 7px;
}

.product-catalog-controls select,
.product-catalog-controls input {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 12px;
}

.product-catalog-grid {
  max-height: 272px;
  overflow-y: auto;
  padding-right: 3px;
}

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

.quick-product-header strong,
.quick-product-header small {
  display: block;
}

.quick-product-header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.quick-edit-button {
  min-height: 34px;
  padding: 5px 9px;
  border-color: #2463a7;
  background: #eef5ff;
  color: #174d87;
  font-size: 10px;
}

.quick-edit-button.active {
  border-color: #d97706;
  background: #fff3df;
  color: #9a4f00;
}

.product-group-tabs {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  overflow-x: auto;
  padding: 1px 1px 4px;
  scrollbar-width: thin;
}

.product-group-tabs button {
  min-width: max-content;
  min-height: 34px;
  padding: 5px 10px;
  border-color: #c8d6e6;
  background: #f4f7fb;
  color: #29435f;
  font-size: 10px;
  box-shadow: none;
}

.product-group-tabs button.active {
  border-color: #1565c0;
  background: #1565c0;
  color: #fff;
}

.product-catalog-grid.editing button {
  position: relative;
  border-style: dashed;
}

.product-catalog-grid button.is-favorite {
  border-color: #15936f;
  background: #effcf7;
}

.favorite-action {
  position: absolute;
  top: 4px;
  right: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #1565c0;
  color: #fff !important;
  font-size: 8px !important;
  font-weight: 900;
}

.product-catalog-grid button.is-favorite .favorite-action {
  background: #c2410c;
}

.quick-product-grid strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-product-grid span {
  color: #0877ff;
  font-size: 16px;
  font-weight: 900;
}

.checkout-note {
  margin: 10px 12px 0;
  color: #202938;
  font-size: 12px;
  line-height: 1.55;
}

.terminal-note {
  margin: 20px 4px 0;
  color: #7a8aa3;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1500px) {
  .pos-workspace-shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .pos-page {
    height: calc(100vh - 24px);
    overflow: hidden;
  }

  .pos-workspace-shell .content {
    padding: 12px;
  }

  .pos-command-bar {
    grid-template-columns: minmax(520px, 1fr) minmax(360px, 420px);
    gap: 10px;
    padding: 0 0 10px;
  }

  .pos-search-cluster {
    grid-template-columns: 78px minmax(220px, 1fr) 64px 72px 88px 88px;
    gap: 6px;
    min-height: 56px;
  }

  .price-tier-select,
  .pos-input-wrap,
  .pos-action-button {
    height: 56px;
    min-height: 56px;
  }

  .pos-input-wrap {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 0 10px;
  }

  .pos-barcode-input {
    min-height: 50px;
    font-size: 14px;
  }

  .pos-action-button {
    gap: 2px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .pos-action-button small {
    font-size: 9px;
  }

  .fintech-totals {
    gap: 7px;
  }

  .fintech-totals label {
    gap: 4px;
    font-size: 12px;
  }

  .fintech-totals input,
  .fintech-totals strong {
    height: 45px;
    padding: 0 10px;
    font-size: 22px;
  }

  .pos-fintech-board {
    grid-template-columns: minmax(500px, 1fr) minmax(370px, 420px);
    gap: 10px;
    overflow: hidden;
  }

  .pos-product-panel,
  .pos-checkout-panel {
    height: 100%;
  }

  .pos-product-panel,
  .pos-checkout-panel {
    padding: 11px;
  }

  .product-toolbar {
    grid-template-columns: 118px minmax(150px, 1fr) minmax(160px, 220px) 72px;
    gap: 8px;
    margin-bottom: 12px;
  }

  .product-count {
    min-height: 42px;
  }

  .product-count strong {
    font-size: 16px;
  }

  .product-count > span {
    margin-top: 2px;
    font-size: 17px;
  }

  .misc-amount-control,
  .discount-control {
    grid-template-columns: minmax(110px, 1fr) 46px;
  }

  .misc-amount-control input,
  .discount-control input,
  .discount-control select,
  .customer-select-row select {
    min-height: 39px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .misc-amount-control button,
  .more-button,
  .select-customer-button,
  .chart-button {
    min-height: 39px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .compact-basket-tabs {
    gap: 6px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .compact-basket-tabs button {
    min-height: 44px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .pos-table th,
  .pos-table td {
    height: 42px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .pos-table .empty-table-cell {
    height: 270px;
  }

  .cart-empty-state {
    min-height: 170px;
  }

  .cart-empty-icon {
    width: 58px;
    height: 58px;
  }

  .qty-input {
    width: 64px;
  }

  .customer-select-row {
    grid-template-columns: minmax(0, 1fr) 48px 54px;
  }

  .customer-detail-strip {
    gap: 6px;
    margin: 9px 0;
  }

  .customer-detail-strip span,
  .customer-detail-strip button {
    font-size: 11px;
  }

  .fintech-quick-amounts button {
    min-height: 38px;
    font-size: 14px;
  }

  .pos-payment-buttons,
  .fintech-payment-buttons {
    gap: 5px;
    margin-top: 9px;
  }

  .pos-payment-buttons button {
    min-height: 86px;
    padding: 10px 4px;
  }

  .pos-payment-buttons svg {
    width: 26px;
    height: 26px;
  }

  .pos-payment-buttons strong {
    font-size: 12px;
  }

  .payment-key {
    min-height: 14px;
    font-size: 11px;
  }

  .product-list-tabs {
    margin-top: 12px;
  }

  .product-list-tabs button {
    min-height: 36px;
    font-size: 12px;
  }

  .quick-product-grid {
    gap: 7px;
    margin-top: 9px;
  }

  .quick-product-grid button {
    min-height: 68px;
    padding: 9px;
  }

  .quick-product-grid span {
    font-size: 14px;
  }

  .terminal-note {
    margin-top: 12px;
    font-size: 12px;
  }
}

/* Etiket basımı */
.label-sheet {
  display: flex;
  flex-wrap: wrap;
  width: 110mm;
  box-sizing: border-box;
  padding: 3mm 5mm;
  column-gap: 10mm;
  row-gap: 0;
  margin-top: 12px;
}

.label-tag {
  width: var(--label-width, 45mm);
  height: var(--label-height, 24mm);
  flex: 0 0 var(--label-width, 45mm);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 1px 2px;
  text-align: center;
  background: #ffffff;
}

.label-name {
  font-size: var(--label-name-size, 13px);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-price {
  margin: 0 0 1px;
  color: var(--ink);
  font-size: var(--label-price-size, 22px);
  font-weight: 900;
}

.label-tag svg {
  display: block;
  max-width: 100%;
  max-height: 12mm;
  margin: 0 auto;
}

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

.label-settings-grid label,
.label-settings-grid span {
  display: block;
}

.label-settings-grid span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.label-settings-grid input {
  width: 100%;
}

.group-sales-report {
  margin-top: 16px;
}

.group-sales-report .panel-heading select {
  width: min(260px, 40%);
}

.label-nobarcode {
  color: var(--muted);
  font-size: 11px;
  padding: 12px 0;
}

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

  .app-shell.sidebar-collapsed,
  .pos-workspace-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .pos-workspace-shell {
    grid-template-columns: 206px minmax(0, 1fr);
  }

  .topbar,
  .content {
    padding-left: 22px;
    padding-right: 22px;
  }

  .metrics-grid,
  .action-grid,
  .dashboard-grid,
  .owner-radar-grid,
  .device-health-grid,
  .device-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-card,
  .inline-form {
    flex-wrap: wrap;
  }

  .pos-top-row,
  .pos-body {
    grid-template-columns: 1fr;
  }

  .pos-command-bar,
  .pos-fintech-board {
    grid-template-columns: 1fr;
  }

  .pos-page {
    height: auto;
    min-height: calc(100vh - 55px);
    overflow: visible;
  }

  .pos-fintech-board {
    overflow: visible;
  }

  .pos-product-panel,
  .pos-checkout-panel {
    height: auto;
  }

  .pos-command-bar {
    padding-top: 18px;
  }

  .product-toolbar {
    grid-template-columns: 140px minmax(220px, 1fr) minmax(260px, 320px) 88px;
    gap: 14px;
  }

  .compact-basket-tabs {
    gap: 8px;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    height: auto;
    min-height: 68px;
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .page-header,
  .pos-header,
  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .form-grid,
  .metrics-grid,
  .action-grid,
  .dashboard-grid,
  .owner-radar-grid,
  .device-health-grid,
  .device-config-grid,
  .pos-totals,
  .pos-basket-tabs {
    grid-template-columns: 1fr;
  }

  .device-health-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .pos-workspace-shell .content {
    padding: 8px;
  }

  .pos-search-cluster,
  .fintech-totals,
  .product-toolbar,
  .customer-detail-strip {
    grid-template-columns: 1fr;
  }

  .pos-fintech-board {
    gap: 16px;
    padding: 10px;
  }

  .compact-basket-tabs,
  .fintech-quick-amounts,
  .fintech-payment-buttons,
  .product-list-tabs,
  .quick-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-tier-select,
  .pos-barcode-input,
  .pos-action-button {
    width: 100%;
    border-left: 1px solid var(--line-strong);
  }

  .misc-amount-control,
  .discount-control,
  .customer-select-row {
    grid-template-columns: 1fr;
  }

  .login-screen {
    padding: 22px;
    background: var(--bg);
  }

  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
    color: var(--ink);
    gap: 22px;
  }

  .login-brand-panel p,
  .login-signal-grid span {
    color: var(--muted);
  }

  .login-signal-grid {
    grid-template-columns: 1fr;
  }

  .login-signal-grid div {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.76);
  }

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

  .command-card input,
  .command-card select,
  .command-card button,
  .inline-form input,
  .inline-form select,
  .inline-form button {
    width: 100%;
  }
}

/* 1024x768 kasa ve yönetim terminalleri */
@media (min-width: 821px) and (max-width: 1100px),
  (min-width: 821px) and (max-width: 1366px) and (max-height: 780px) {
  body {
    font-size: 12px;
  }

  .app-shell,
  .pos-workspace-shell {
    grid-template-columns: 154px minmax(0, 1fr);
  }

  .sidebar {
    padding: 8px 7px 6px;
  }

  .brand-block {
    gap: 0;
    padding: 0 3px 8px;
  }

  .brand-logo-surface {
    min-height: 38px;
    padding: 5px 7px;
  }

  .brand-logo {
    max-height: 29px;
  }

  .brand-block p {
    display: none;
  }

  .nav-section + .nav-section {
    margin-top: 6px;
  }

  .nav-section-title {
    padding: 0 7px 3px;
    font-size: 8px;
  }

  .sidebar-nav a {
    min-height: 29px;
    gap: 6px;
    padding: 4px 7px;
    font-size: 10.5px;
  }

  .nav-icon {
    width: 15px;
    height: 15px;
  }

  .user-box {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 4px 6px;
    padding: 5px 4px 0;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .user-meta strong {
    font-size: 10.5px;
  }

  .user-meta span {
    font-size: 9px;
  }

  .user-box button {
    min-height: 27px;
    margin-top: 1px;
    padding: 3px 6px;
    font-size: 10.5px;
  }

  .topbar {
    height: 44px;
    padding: 0 12px;
  }

  .topbar-kicker {
    display: none;
  }

  .topbar-title {
    font-size: 14px;
  }

  .status-pill {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .content,
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .content {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .content-inner {
    width: 100%;
  }

  .management-page,
  .dashboard-page {
    gap: 8px;
  }

  .page-header {
    gap: 9px;
    margin-bottom: 9px;
  }

  .page-header h2 {
    font-size: 20px;
  }

  .page-header p {
    margin-top: 3px;
    font-size: 11px;
  }

  .section-eyebrow {
    margin-bottom: 1px;
    font-size: 9px;
  }

  .header-stack {
    min-width: 132px;
    padding: 7px 9px;
  }

  .header-stack span {
    font-size: 10px;
  }

  .header-stack strong {
    font-size: 12px;
  }

  .metrics-grid,
  .action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .compact-metrics {
    margin-bottom: 7px;
  }

  .metric-card,
  .compact-metrics .metric-card {
    min-height: 78px;
    padding: 9px;
    border-top-width: 3px;
  }

  .metric-card span,
  .metric-card small,
  .action-kicker,
  .action-tile small {
    font-size: 9.5px;
  }

  .metric-card strong {
    margin: 3px 0 1px;
    font-size: 19px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 8px;
  }

  .owner-radar-grid,
  .device-health-grid,
  .device-config-grid {
    gap: 8px;
  }

  .dashboard-panel,
  .device-health-card,
  .price-queue-card {
    padding: 10px;
  }

  .panel-heading {
    gap: 8px;
    margin-bottom: 9px;
  }

  .panel-heading h3,
  .card-title,
  .section-title {
    font-size: 14px;
  }

  .payment-mix,
  .ops-list {
    gap: 6px;
  }

  .payment-row {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 7px;
  }

  .ops-item {
    gap: 7px;
    padding: 7px;
  }

  .action-tile {
    min-height: 91px;
    padding: 10px;
  }

  .action-tile strong {
    margin: 4px 0 2px;
    font-size: 14px;
  }

  .card {
    margin-bottom: 8px;
    padding: 10px;
    overflow-x: auto;
  }

  .command-card {
    gap: 7px;
    padding: 8px;
  }

  .field {
    gap: 3px;
    margin-bottom: 8px;
  }

  .form-grid {
    gap: 7px 9px;
  }

  input,
  select,
  textarea,
  button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }

  th,
  td {
    padding: 7px 8px;
    font-size: 11px;
  }

  th {
    font-size: 9.5px;
  }

  .line-row {
    grid-template-columns: minmax(150px, 2fr) repeat(3, minmax(75px, 1fr)) auto;
    gap: 6px;
  }

  .login-screen {
    padding: 18px;
    background: linear-gradient(90deg, #101615 0%, #18201f 59%, #edf2f5 59.2%, #f7fafb 100%);
  }

  .login-stage {
    width: min(100%, 940px);
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
  }

  .login-brand-panel {
    min-height: 380px;
  }

  .login-brand-panel h1 {
    font-size: 36px;
  }

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

  .login-card {
    padding: 22px;
  }

  .login-card p.subtitle {
    margin-bottom: 16px;
  }

  /* POS, 1024x768'de iki çalışma panelini yan yana tutar. */
  .pos-workspace-shell .content {
    padding: 6px;
  }

  .pos-page {
    height: calc(100vh - 12px);
    min-height: 0;
    overflow: hidden;
  }

  .fintech-pos {
    gap: 6px;
  }

  .pos-command-bar {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 6px;
    padding: 0 0 6px;
  }

  .pos-search-cluster {
    grid-template-columns: 58px minmax(140px, 1fr) 48px 54px 62px 62px;
    gap: 4px;
    min-height: 46px;
  }

  .price-tier-select,
  .pos-input-wrap,
  .pos-action-button {
    height: 46px;
    min-height: 46px;
  }

  .price-tier-select {
    padding: 4px 5px;
    font-size: 10px;
  }

  .pos-input-wrap {
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 0 7px;
  }

  .pos-input-wrap svg,
  .pos-action-button svg {
    width: 17px;
    height: 17px;
  }

  .pos-barcode-input {
    min-height: 42px;
    font-size: 11px;
  }

  .pos-action-button {
    gap: 1px;
    padding: 3px;
    font-size: 9.5px;
  }

  .pos-action-button small {
    display: none;
  }

  .fintech-totals {
    gap: 3px;
  }

  .fintech-totals label {
    gap: 2px;
    font-size: 9.5px;
  }

  .fintech-totals input,
  .fintech-totals strong {
    height: 31px;
    padding: 0 6px;
    font-size: 16px;
  }

  .pos-message,
  .pos-message.warning {
    min-height: 34px;
    gap: 6px;
    padding: 6px 8px;
    font-size: 10.5px;
  }

  .pos-message svg {
    width: 17px;
    height: 17px;
  }

  .pos-fintech-board {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
    gap: 6px;
    min-height: 0;
    overflow: hidden;
  }

  .pos-product-panel,
  .pos-checkout-panel {
    height: 100%;
    padding: 8px;
  }

  .product-toolbar {
    grid-template-columns: 76px minmax(100px, 1fr) minmax(110px, 140px) 55px;
    gap: 5px;
    margin-bottom: 7px;
  }

  .product-count {
    min-height: 34px;
  }

  .product-count strong {
    font-size: 12px;
  }

  .product-count > span {
    margin-top: 1px;
    font-size: 14px;
  }

  .misc-amount-control,
  .discount-control {
    grid-template-columns: minmax(80px, 1fr) 38px;
  }

  .misc-amount-control input,
  .discount-control input,
  .discount-control select,
  .customer-select-row select,
  .misc-amount-control button,
  .more-button,
  .select-customer-button,
  .chart-button {
    min-height: 33px;
    padding: 4px 5px;
    font-size: 10px;
  }

  .compact-basket-tabs {
    gap: 3px;
    margin: 0 0 6px;
  }

  .compact-basket-tabs button {
    min-height: 34px;
    padding: 4px;
    font-size: 9.5px;
  }

  .pos-table th,
  .pos-table td {
    height: 34px;
    padding: 4px 6px;
    font-size: 10.5px;
  }

  .pos-table .empty-table-cell {
    height: 245px;
  }

  .cart-empty-state {
    min-height: 118px;
  }

  .cart-empty-icon {
    width: 44px;
    height: 44px;
  }

  .cart-empty-icon svg {
    width: 30px;
    height: 30px;
  }

  .cart-empty-state strong {
    font-size: 13px;
  }

  .cart-empty-state span {
    font-size: 10px;
  }

  .qty-input {
    width: 52px;
  }

  .customer-select-row {
    grid-template-columns: minmax(0, 1fr) 42px 46px;
    gap: 3px;
  }

  .customer-detail-strip {
    gap: 4px;
    margin: 5px 0;
  }

  .customer-detail-strip span,
  .customer-detail-strip button {
    min-height: 23px;
    font-size: 9.5px;
  }

  .fintech-quick-amounts {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
  }

  .fintech-quick-amounts button {
    min-height: 31px;
    padding: 4px;
    font-size: 11px;
  }

  .pos-payment-buttons,
  .fintech-payment-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-top: 6px;
  }

  .pos-payment-buttons button {
    min-height: 62px;
    gap: 2px;
    padding: 5px 2px;
  }

  .pos-payment-buttons svg {
    width: 20px;
    height: 20px;
  }

  .pos-payment-buttons strong,
  .payment-key {
    font-size: 9.5px;
  }

  .product-list-tabs {
    gap: 3px;
    margin-top: 7px;
  }

  .product-list-tabs button {
    min-height: 28px;
    padding: 3px;
    font-size: 9px;
  }

  .quick-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 6px;
  }

  .quick-product-grid button {
    min-height: 53px;
    padding: 6px;
  }

  .quick-product-grid strong {
    font-size: 10px;
  }

  .quick-product-grid span {
    font-size: 11px;
  }

  .checkout-note,
  .terminal-note {
    margin-top: 6px;
    font-size: 9.5px;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 18, 32, .78);
  backdrop-filter: blur(4px);
}

@media print {
  @page {
    size: 110mm 30mm;
    margin: 0;
  }

  .no-print,
  .sidebar,
  .topbar {
    display: none !important;
  }

  .app-shell,
  .main-shell,
  .content,
  .content-inner {
    display: block;
    height: auto;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .label-tag {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .label-name {
    line-height: 1.05;
  }

  .label-price {
    line-height: 1;
  }

  .label-sheet {
    width: 110mm;
    margin: 0;
    padding: 3mm 5mm;
    column-gap: 10mm;
    row-gap: 0;
  }
}
