:root {
  color-scheme: light;
  --ink: #18202a;
  --ink-soft: #33404f;
  --muted: #6d7887;
  --muted-2: #8b95a3;
  --line: #dce1e7;
  --line-strong: #cbd2da;
  --panel: #ffffff;
  --canvas: #f3f5f7;
  --sidebar: #171c24;
  --sidebar-soft: #222936;
  --yellow: #e7b824;
  --yellow-soft: #fff7d8;
  --teal: #16766e;
  --teal-soft: #e2f2ef;
  --blue: #27669a;
  --blue-soft: #e7f0f8;
  --green: #24734f;
  --green-soft: #e6f3eb;
  --red: #a54137;
  --red-soft: #fbe9e6;
  --amber: #976400;
  --amber-soft: #fff1c9;
  --shadow-soft: 0 8px 24px rgba(26, 35, 47, 0.06);
  --shadow-raised: 0 14px 36px rgba(22, 29, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
label:focus-within {
  outline: 3px solid rgba(39, 102, 154, 0.22);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--sidebar);
  color: #f7f8fa;
  border-right: 1px solid #2a313d;
}

.brand {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #2a313d;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  color: #171c24;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand-copy span {
  color: #aeb6c3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-nav {
  padding: 18px 12px;
}

.nav-label,
.section-kicker,
.page-eyebrow,
.record-label {
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-label {
  padding: 0 10px 7px;
  color: #818b99;
}

.nav-label-spaced {
  margin-top: 18px;
}

.nav-item {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 5px;
  padding: 0 11px;
  background: transparent;
  color: #b8c0cc;
  cursor: pointer;
  text-align: left;
  font-weight: 650;
}

.nav-item + .nav-item {
  margin-top: 3px;
}

.nav-item:hover {
  background: #202732;
  color: #ffffff;
}

.nav-item.active {
  border-left-color: var(--yellow);
  background: #252d39;
  color: #ffffff;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke-width: 2;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
  border-top: 1px solid #2a313d;
}

.security-state,
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.security-state {
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid #323b48;
  border-radius: 6px;
  background: #1d242e;
}

.security-state > div,
.user-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.security-state strong,
.user-copy strong {
  overflow: hidden;
  color: #edf0f4;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-state div span,
.user-copy span {
  color: #909aa8;
  font-size: 11px;
}

.security-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 115, 79, 0.22);
  color: #78c79f;
}

.security-icon svg {
  width: 17px;
  height: 17px;
}

.user-row {
  padding: 4px 2px;
}

.user-avatar,
.customer-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  background: var(--yellow);
  color: #20242b;
  font-size: 12px;
}

.user-copy {
  flex: 1;
}

.app-main {
  min-width: 0;
}

.command-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.page-heading,
.command-actions {
  display: flex;
  align-items: center;
}

.page-heading {
  min-width: 0;
  gap: 10px;
}

.page-heading > div {
  min-width: 0;
}

.page-heading h1 {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-actions {
  gap: 10px;
}

.connection-state {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cee3d7;
  border-radius: 999px;
  padding: 0 10px;
  background: #f3faf6;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #37a269;
  box-shadow: 0 0 0 3px rgba(55, 162, 105, 0.14);
}

.connection-state.offline {
  border-color: #edc9c4;
  background: var(--red-soft);
  color: var(--red);
}

.connection-state.offline .connection-dot {
  background: #c2584d;
  box-shadow: 0 0 0 3px rgba(194, 88, 77, 0.12);
}

.current-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.content-shell {
  width: min(1740px, 100%);
  margin: 0 auto;
  padding: 18px 22px 30px;
}

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

.metric {
  position: relative;
  min-width: 0;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: #75808e;
}

.metric-amber::before { background: var(--yellow); }
.metric-teal::before { background: var(--teal); }
.metric-blue::before { background: var(--blue); }
.metric-green::before { background: var(--green); }
.metric-red::before { background: var(--red); }

.metric-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #eef1f4;
  color: #536171;
}

.metric-amber .metric-icon { background: var(--yellow-soft); color: var(--amber); }
.metric-teal .metric-icon { background: var(--teal-soft); color: var(--teal); }
.metric-blue .metric-icon { background: var(--blue-soft); color: var(--blue); }
.metric-green .metric-icon { background: var(--green-soft); color: var(--green); }
.metric-red .metric-icon { background: var(--red-soft); color: var(--red); }

.metric-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.metric > div {
  min-width: 0;
}

.metric-label {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.customer-browser,
.customer-detail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.customer-browser {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 112px);
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.panel-heading,
.customer-header,
.table-head,
.import-toolbar,
.service-head,
.upload-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.table-head h3,
.import-toolbar h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.count-badge {
  min-width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  background: #f4f6f8;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 7px;
  margin-top: 12px;
}

.search-input-wrap {
  height: 40px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 8px 0 10px;
  background: #ffffff;
}

.search-input-wrap:focus-within {
  border-color: #6f9fc3;
}

.search-input-wrap > [data-icon] {
  color: #8a94a2;
}

.search-input-wrap input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-input-wrap input::placeholder {
  color: #9aa3af;
}

.icon-button,
.bare-icon-button,
.input-action {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
}

.icon-button:hover,
.bare-icon-button:hover,
.input-action:hover {
  border-color: var(--line-strong);
  background: #f1f4f7;
}

.primary-icon-button {
  border-color: #252c36;
  background: #252c36;
  color: #ffffff;
}

.primary-icon-button:hover {
  border-color: #343d49;
  background: #343d49;
}

.bare-icon-button {
  width: 34px;
  height: 34px;
  border-color: transparent;
  background: transparent;
  color: #aab3c0;
}

.input-action {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-color: transparent;
  color: #6f7986;
}

.mobile-menu-button {
  display: none;
  color: var(--ink-soft);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  margin-top: 10px;
  border-radius: 6px;
  padding: 3px;
  background: #edf0f3;
}

.segment {
  min-width: 0;
  height: 30px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  padding: 0 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment:hover {
  color: var(--ink);
}

.segment.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(26, 35, 47, 0.12);
}

.result-list {
  flex: 1 1 auto;
  min-height: 180px;
  margin-top: 10px;
  display: grid;
  gap: 6px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.result-item {
  position: relative;
  width: 100%;
  min-height: 86px;
  display: grid;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 10px 10px 12px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
}

.result-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: transparent;
}

.result-item:hover {
  border-color: #aeb8c3;
  background: #fafbfc;
}

.result-item.active {
  border-color: #d4b23b;
  background: #fffdf5;
}

.result-item.active::before {
  background: var(--yellow);
}

.result-main,
.result-identity,
.result-services {
  display: flex;
  align-items: center;
}

.result-main {
  justify-content: space-between;
  gap: 10px;
}

.result-identity {
  min-width: 0;
  gap: 8px;
}

.plate-tag {
  flex: 0 0 auto;
  border: 1px solid #c8ced6;
  border-radius: 4px;
  padding: 3px 6px;
  background: #f8f9fa;
  color: #202832;
  font-size: 12px;
  font-weight: 850;
}

.result-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-id {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 750;
}

.result-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-services {
  gap: 9px;
}

.service-dot-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.service-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b3bbc5;
}

.service-dot.active { background: #31936a; }
.service-dot.waiting { background: #d79c13; }
.service-dot.problem { background: #c2584d; }

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 24px;
  height: 24px;
  color: #9ca5b1;
}

.customer-detail {
  overflow: hidden;
}

.customer-detail[aria-busy="true"] {
  cursor: progress;
}

.customer-header {
  min-height: 94px;
  align-items: flex-start;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

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

.customer-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid #dbbd4b;
  background: var(--yellow-soft);
  color: #785100;
  font-size: 15px;
}

.customer-title-wrap {
  min-width: 0;
}

.customer-title-wrap h2 {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.2;
}

.customer-title-wrap p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.status-chips {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.chip,
.service-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7dde4;
  border-radius: 999px;
  background: #f1f3f5;
  color: #707b88;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.chip {
  min-height: 27px;
  padding: 5px 9px;
}

.service-status {
  min-height: 24px;
  max-width: 112px;
  overflow: hidden;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip.active,
.service-status.active {
  border-color: #c6e2d3;
  background: var(--green-soft);
  color: var(--green);
}

.chip.waiting,
.service-status.waiting {
  border-color: #ead39a;
  background: var(--amber-soft);
  color: var(--amber);
}

.chip.problem,
.service-status.problem {
  border-color: #efc8c3;
  background: var(--red-soft);
  color: var(--red);
}

.customer-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.fact {
  min-width: 0;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
}

.fact + .fact {
  border-left: 1px solid var(--line);
}

.fact-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #eef1f4;
  color: #5a6877;
}

.fact-icon svg {
  width: 15px;
  height: 15px;
}

.fact > div {
  min-width: 0;
}

.fact span:not(.fact-icon) {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.fact strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.tabs {
  min-height: 52px;
  display: flex;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 8px 18px 0;
}

.tab {
  position: relative;
  height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.tab::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  content: "";
  background: transparent;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  color: var(--ink);
}

.tab.active::after {
  background: var(--yellow);
}

.tab svg {
  width: 16px;
  height: 16px;
}

.tab-content {
  display: none;
  padding: 16px 18px 18px;
}

.tab-content.active {
  display: block;
}

.warning-box {
  margin-bottom: 12px;
  border: 1px solid #e5aaa3;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff7f5;
  color: #762e27;
  font-weight: 700;
}

.warning-box ul {
  margin: 8px 0 0 18px;
  padding: 0;
  font-weight: 600;
}

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

.service-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-top-width: 3px;
  border-radius: 6px;
  padding: 12px;
  background: #ffffff;
}

.service-yandex { border-top-color: var(--yellow); }
.service-pos { border-top-color: var(--teal); }
.service-radio { border-top-color: var(--blue); }

.service-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.service-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.service-icon,
.upload-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #eef1f4;
  color: var(--ink-soft);
}

.service-yandex .service-icon { background: var(--yellow-soft); color: var(--amber); }
.service-pos .service-icon { background: var(--teal-soft); color: var(--teal); }
.service-radio .service-icon { background: var(--blue-soft); color: var(--blue); }

.service-icon svg,
.upload-icon svg {
  width: 17px;
  height: 17px;
}

.service-title > div,
.upload-card-head > div {
  min-width: 0;
}

.service-title span:not(.service-icon),
.upload-card-head div span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
}

.service-title h3,
.upload-card-head h3 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(88px, 38%) minmax(0, 1fr);
  gap: 0;
}

dt,
dd {
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 11px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-weight: 700;
  text-align: right;
}

dt:last-of-type,
dd:last-of-type {
  border-bottom: 0;
}

.table-head {
  align-items: end;
  margin-bottom: 12px;
}

.table-head > span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

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

th {
  background: #f0f3f5;
  color: #4d5a69;
  font-size: 10px;
  font-weight: 800;
}

td {
  color: var(--ink-soft);
  font-size: 12px;
}

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

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

.import-toolbar {
  align-items: end;
  margin-bottom: 14px;
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.privacy-note svg {
  width: 15px;
  height: 15px;
}

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

.upload-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #ffffff;
}

.upload-card-head {
  justify-content: flex-start;
}

.upload-card > p {
  min-height: 50px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.file-picker {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px dashed #aeb8c3;
  border-radius: 6px;
  padding: 12px;
  background: #f8fafb;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.file-picker:hover {
  border-color: #718395;
  background: #f2f5f7;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-picker span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--blue);
}

.primary-button {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  border: 1px solid #252c36;
  border-radius: 6px;
  padding: 8px 12px;
  background: #252c36;
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
}

.primary-button:hover {
  border-color: #343d49;
  background: #343d49;
}

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

.import-result {
  min-height: 58px;
  margin-top: 10px;
  border-left: 3px solid #b7c0ca;
  border-radius: 4px;
  padding: 9px 10px;
  background: #f1f4f6;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* Telsiz operations */
.module-workspace {
  min-width: 0;
}

.module-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-strong);
  padding: 6px 0 18px;
}

.module-toolbar > div:first-child {
  min-width: 0;
}

.module-toolbar h2 {
  margin: 4px 0 0;
  font-size: 21px;
  line-height: 1.25;
}

.module-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.module-actions .primary-button,
.module-actions .secondary-button,
.module-actions .danger-button,
.workflow-form footer .primary-button,
.workflow-form footer .secondary-button,
.workflow-form footer .danger-button {
  width: auto;
  min-height: 38px;
  margin: 0;
  white-space: nowrap;
}

.secondary-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 750;
}

.secondary-button:hover {
  border-color: #9aa6b3;
  background: #f5f7f8;
}

.danger-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #c64343;
  border-radius: 6px;
  padding: 8px 12px;
  background: #ffffff;
  color: #a92424;
  cursor: pointer;
  font-weight: 750;
}

.danger-button:hover {
  background: #fff4f4;
}

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

.secondary-button svg,
.danger-button svg,
.table-button svg {
  width: 16px;
  height: 16px;
}

.radio-metrics {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 14px 0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.radio-metrics.finance-hidden {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.qr-registration-content {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.qr-registration-content img {
  width: 220px;
  height: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  image-rendering: pixelated;
}

.qr-registration-content > div {
  display: grid;
  gap: 12px;
}

.qr-registration-content p {
  margin: 0;
  color: var(--muted);
}

.qr-registration-content label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.radio-device-file {
  margin-bottom: 10px;
}

.template-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: #126c50;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.template-download svg {
  width: 16px;
  height: 16px;
}

.radio-metrics article {
  min-width: 0;
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
}

.radio-metrics article + article {
  border-left: 1px solid var(--line);
}

.radio-metrics span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-metrics strong {
  font-size: 21px;
  line-height: 1.1;
}

.radio-metrics .attention {
  background: #fff9e8;
}

.radio-metrics .attention strong {
  color: var(--amber);
}

.module-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-strong);
}

.module-tab {
  min-height: 44px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.module-tab:hover {
  color: var(--ink);
}

.module-tab.active {
  border-bottom-color: var(--yellow);
  color: var(--ink);
}

.module-panel {
  display: none;
  min-width: 0;
  padding-top: 16px;
}

.module-panel.active {
  display: block;
}

.module-table-head {
  margin-bottom: 10px;
}

.module-filter-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.module-filter-row .module-table-head {
  flex: 1;
  margin: 0;
}

.compact-search {
  width: min(340px, 100%);
}

.operations-table-wrap {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.loan-alert-band {
  margin-bottom: 22px;
  border-left: 4px solid var(--amber);
  padding-left: 12px;
}

.loan-alert-band .module-table-head {
  margin-top: 0;
}

.loan-alert-table {
  min-width: 1120px;
}

.loan-alert-overdue td {
  background: #fff8f6;
}

.operations-table {
  min-width: 980px;
}

.customer-operations-table,
.message-operations-table {
  min-width: 1260px;
}

.message-filter-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.message-filter-tools select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0 9px;
  background: #ffffff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
}

.operations-table th {
  height: 38px;
  background: #edf1f4;
}

.operations-table td {
  height: 62px;
  vertical-align: middle;
  white-space: normal;
}

.operations-table td strong,
.cell-subtitle,
.cell-note {
  display: block;
}

.operations-table td strong {
  color: var(--ink);
}

.cell-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.cell-note {
  max-width: 280px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.debt-value {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid #e8bdb7;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.message-preview {
  display: -webkit-box;
  max-width: 430px;
  overflow: hidden;
  color: var(--ink-soft);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.message-error {
  max-width: 210px;
  color: var(--red);
  white-space: normal;
}

.operation-status {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f4f6;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.operation-status.ok {
  border-color: #c7e2d2;
  background: var(--green-soft);
  color: var(--green);
}

.operation-status.info {
  border-color: #c8daea;
  background: var(--blue-soft);
  color: var(--blue);
}

.operation-status.waiting {
  border-color: #ead49a;
  background: var(--amber-soft);
  color: var(--amber);
}

.operation-status.danger {
  border-color: #e8bdb7;
  background: var(--red-soft);
  color: var(--red);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.table-button {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 5px 8px;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.table-button:hover {
  background: #f2f5f7;
}

.table-button.primary {
  border-color: #3c4857;
  background: #303946;
  color: #ffffff;
}

.table-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

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

.workflow-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-raised);
}

.workflow-dialog::backdrop {
  background: rgba(15, 21, 29, 0.58);
}

.compact-dialog {
  width: min(660px, calc(100vw - 32px));
}

.collection-center-dialog {
  width: min(720px, calc(100vw - 32px));
}

.collection-center-picker > label input {
  min-height: 52px;
  padding: 12px;
  font-size: 13px;
}

.collection-center-picker .smart-search-results {
  top: 78px;
}

.collection-center-picker .smart-result {
  padding: 13px 12px;
}

.report-dialog {
  width: min(1080px, calc(100vw - 32px));
}

.report-table-wrap {
  max-height: 55vh;
}

.workflow-form > header,
.workflow-form > footer {
  position: sticky;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
}

.workflow-form > header {
  top: 0;
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
}

.workflow-form > header h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.workflow-form > footer {
  bottom: 0;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 12px 18px;
}

.form-section {
  padding: 17px 18px;
}

.form-section + .form-section {
  border-top: 1px solid var(--line);
}

.form-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.form-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.form-section-heading p,
.form-help {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.subtle-section {
  background: #f7f9fa;
}

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

.form-grid label,
.full-label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.form-field-with-action label {
  display: grid;
  gap: 6px;
}

.form-field-with-action .secondary-button {
  min-height: 40px;
  white-space: nowrap;
}

.smart-picker {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 7px;
}

.smart-picker > label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.smart-picker .secondary-button {
  width: max-content;
  min-height: 36px;
}

.smart-search-results {
  position: absolute;
  z-index: 12;
  top: 66px;
  right: 0;
  left: 0;
  max-height: 270px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(27, 39, 50, 0.17);
}

.smart-result {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 4px;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.smart-result:hover,
.smart-result:focus-visible {
  background: #edf5f2;
  outline: none;
}

.smart-result strong,
.smart-selected strong {
  font-size: 12px;
}

.smart-result span,
.smart-selected span {
  color: var(--muted);
  font-size: 11px;
}

.smart-selected {
  min-height: 45px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #8cb9a7;
  border-left: 4px solid #17835e;
  border-radius: 5px;
  padding: 8px 10px;
  background: #eef8f4;
}

.smart-selected[hidden],
.smart-search-results[hidden] {
  display: none;
}

.smart-empty {
  padding: 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

#saleStockImportRows {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 10px;
  color: var(--ink);
  font: inherit;
  letter-spacing: 0;
}

.section-divider {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.full-label textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  letter-spacing: 0;
}

.form-grid input,
.form-grid select {
  min-height: 40px;
}

.form-grid textarea,
.full-label textarea {
  resize: vertical;
  line-height: 1.45;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.full-label textarea:focus {
  border-color: #6f9fc3;
  outline: 3px solid rgba(39, 102, 154, 0.16);
}

.form-grid .checkbox-label {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
  background: #f7f9fa;
}

.form-grid .checkbox-label input {
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin: 0;
}

.device-check {
  min-height: 50px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-left: 4px solid #9aa6b3;
  border-radius: 5px;
  padding: 9px 11px;
  background: #f3f5f7;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.device-check strong,
.device-check span {
  display: block;
}

.device-check.clear {
  border-color: #c7e2d2;
  border-left-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.device-check.blocked {
  border-color: #e8bdb7;
  border-left-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.device-check.checking {
  border-left-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.form-result {
  min-height: 0;
  margin: 0 18px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.form-result:not(:empty) {
  border-left: 3px solid #87bd9f;
  padding: 8px 10px;
  background: #f0f8f3;
}

.form-result.error {
  border-left-color: #c8655b;
  background: #fff3f1;
  color: var(--red);
}

.return-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  border-left: 3px solid var(--yellow);
  padding: 10px 12px;
  background: #f6f7f8;
}

.return-summary span {
  color: var(--muted);
  font-size: 11px;
}

.customer-card-dialog {
  width: min(1040px, calc(100vw - 32px));
}

.customer-card-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.customer-card-facts.finance-hidden {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.payment-amount-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.payment-amount-line span {
  color: var(--muted);
  font-size: 12px;
}

.payment-amount-line strong {
  font-size: 22px;
}

.permissions-dialog {
  width: min(900px, calc(100vw - 32px));
}

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

.permission-user {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.permission-user-heading,
.permission-user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.permission-user-heading > div,
.permission-user-actions label {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.permission-user-heading span,
.permission-user-actions label {
  color: var(--muted);
  font-size: 11px;
}

.permission-toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.permission-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.permission-toggle + .permission-toggle {
  border-left: 1px solid var(--line);
}

.permission-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--amber);
}

.permission-user-actions label {
  width: min(360px, 100%);
}

.customer-card-facts article {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 13px 16px;
}

.customer-card-facts article + article {
  border-left: 1px solid var(--line);
}

.customer-card-facts span,
.customer-card-facts small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
}

.customer-card-facts strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.customer-card-section {
  padding: 15px 18px;
}

.customer-card-section + .customer-card-section {
  border-top: 1px solid var(--line);
}

.customer-card-section h3 {
  margin: 0 0 9px;
  font-size: 13px;
}

.record-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.record-list article {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
}

.record-list article + article {
  border-top: 1px solid var(--line);
}

.record-list article > div {
  min-width: 0;
}

.record-list article > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.record-list strong,
.record-list span {
  display: block;
  overflow-wrap: anywhere;
}

.record-list strong {
  font-size: 11px;
}

.record-list span:not(.operation-status):not(.debt-value) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.compact-empty {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 10px;
}

[data-icon] svg,
.icon-button svg,
.bare-icon-button svg,
.input-action svg,
.primary-button svg,
.secondary-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.mobile-scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  border: 0;
  background: rgba(12, 16, 22, 0.5);
}

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef1f3;
}

.login-shell {
  width: min(940px, 100%);
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(300px, 42%) minmax(0, 58%);
  overflow: hidden;
  border: 1px solid #d4dae1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-raised);
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 34px;
  background: var(--sidebar);
  color: #ffffff;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}

.login-brand-copy {
  display: grid;
  gap: 2px;
}

.login-brand-copy strong {
  font-size: 22px;
}

.login-brand-copy span {
  color: #9ca6b4;
  font-size: 10px;
  font-weight: 800;
}

.login-operation-visual {
  display: grid;
  gap: 10px;
  margin: 38px 0;
}

.operation-line {
  min-height: 64px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #303947;
  border-radius: 6px;
  padding: 10px;
  background: #1d242e;
}

.operation-line-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #2a3340;
  color: #c5ccd5;
}

.operation-line-icon svg {
  width: 18px;
  height: 18px;
}

.operation-line div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.operation-line strong {
  font-size: 12px;
}

.operation-line div span {
  overflow: hidden;
  color: #8994a2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-state {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4eb27e;
  box-shadow: 0 0 0 4px rgba(78, 178, 126, 0.1);
}

.login-brand-footer {
  color: #798493;
  font-size: 10px;
}

.login-form-panel {
  display: grid;
  place-items: center;
  padding: 46px;
}

.login-form-wrap {
  width: min(390px, 100%);
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.login-mobile-brand .brand-mark {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.login-form-wrap h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
}

.login-form-wrap > p {
  margin: 8px 0 26px;
  color: var(--muted);
  line-height: 1.5;
}

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

.login-field {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.login-input {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 11px;
  background: #ffffff;
}

.login-input:focus-within {
  border-color: #6f9fc3;
}

.login-input svg {
  width: 17px;
  height: 17px;
  color: #8a94a2;
}

.login-input input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.login-submit {
  min-height: 44px;
  margin-top: 4px;
}

.login-error {
  border: 1px solid #e7b1aa;
  border-radius: 6px;
  padding: 10px;
  background: var(--red-soft);
  color: #7d3028;
  font-size: 12px;
  font-weight: 700;
}

.login-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 10px;
}

.login-security-note svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

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

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

  .fact:nth-child(4) {
    border-left: 0;
  }

  .fact:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

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

  .workbench {
    grid-template-columns: 320px minmax(0, 1fr);
  }

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

  .module-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu-button {
    display: inline-grid;
  }

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

  .customer-browser {
    position: static;
    max-height: none;
  }

  .result-list {
    max-height: 360px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand-panel {
    display: none;
  }

  .login-mobile-brand {
    display: flex;
  }

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

  .radio-metrics.finance-hidden {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .radio-metrics article:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .radio-metrics article:nth-child(5) {
    border-top: 1px solid var(--line);
  }

  .radio-metrics article:nth-child(6) {
    border-top: 1px solid var(--line);
  }

  .radio-metrics article:nth-child(7) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .radio-metrics article:nth-child(8) {
    border-top: 1px solid var(--line);
  }

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

  .customer-card-facts.finance-hidden {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-card-facts article:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .customer-card-facts article:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .customer-card-facts article:nth-child(5) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 700px) {
  .command-bar {
    min-height: 68px;
    padding: 10px 12px;
  }

  .page-heading h1 {
    font-size: 17px;
  }

  .connection-state,
  .current-date {
    display: none;
  }

  .content-shell {
    padding: 12px;
  }

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

  .metric {
    min-height: 76px;
    padding: 10px;
  }

  .metric-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .metric strong {
    font-size: 17px;
  }

  .customer-header {
    display: grid;
  }

  .status-chips {
    justify-content: flex-start;
  }

  .customer-facts,
  .import-grid {
    grid-template-columns: 1fr;
  }

  .fact,
  .fact:nth-child(4) {
    min-height: 62px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .fact:last-child {
    border-bottom: 0;
  }

  .tabs {
    padding-right: 10px;
    padding-left: 10px;
  }

  .tab-content {
    padding: 14px 12px;
  }

  .table-head,
  .import-toolbar {
    display: grid;
    align-items: start;
  }

  .table-head > span {
    text-align: left;
  }

  .privacy-note {
    align-items: flex-start;
  }

  .login-page {
    padding: 12px;
  }

  .login-form-panel {
    padding: 28px 20px;
  }

  .module-toolbar h2 {
    font-size: 18px;
  }

  .module-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .module-actions .primary-button,
  .module-actions .secondary-button {
    width: 100%;
  }

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

  .radio-metrics.finance-hidden {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radio-metrics article:nth-child(3),
  .radio-metrics article:nth-child(5),
  .radio-metrics article:nth-child(7) {
    border-left: 0;
  }

  .radio-metrics article:nth-child(3) {
    border-top: 1px solid var(--line);
  }

  .radio-metrics article:nth-child(4),
  .radio-metrics article:nth-child(5),
  .radio-metrics article:nth-child(6),
  .radio-metrics article:nth-child(7),
  .radio-metrics article:nth-child(8) {
    border-top: 1px solid var(--line);
  }

  .radio-metrics.finance-hidden article:nth-child(6) {
    border-left: 1px solid var(--line);
  }

  .qr-registration-content {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .qr-registration-content > div {
    width: 100%;
  }

  .module-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-search {
    width: 100%;
  }

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

  .form-grid .span-2 {
    grid-column: auto;
  }

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

  .form-field-with-action .secondary-button {
    width: 100%;
  }

  .customer-card-facts {
    grid-template-columns: 1fr;
  }

  .customer-card-facts.finance-hidden {
    grid-template-columns: 1fr;
  }

  .customer-card-facts article + article,
  .customer-card-facts article:nth-child(3),
  .customer-card-facts article:nth-child(4) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .record-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .permission-toggles {
    grid-template-columns: 1fr;
  }

  .permission-toggle + .permission-toggle {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .permission-user-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .permission-user-actions .primary-button {
    width: 100%;
  }

  .workflow-dialog,
  .compact-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
}

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

  .search-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .customer-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .customer-title-wrap h2 {
    font-size: 17px;
  }
}

.public-register-page {
  min-height: 100vh;
  margin: 0;
  background: #f2f4f7;
  color: #171c24;
}

.public-register-header {
  min-height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #171c24;
  color: #fff;
  border-bottom: 4px solid #15a36d;
}

.public-register-brand,
.public-register-brand > div,
.public-secure-label {
  display: flex;
  align-items: center;
}

.public-register-brand {
  gap: 12px;
}

.public-register-brand > div {
  align-items: flex-start;
  flex-direction: column;
}

.public-register-brand strong {
  font-size: 20px;
}

.public-register-brand span,
.public-secure-label {
  font-size: 12px;
  color: #cbd2dc;
}

.public-register-brand .brand-mark {
  width: 38px;
  height: 38px;
  color: #fff;
  background: #15a36d;
}

.public-secure-label {
  gap: 7px;
}

.public-secure-label svg {
  width: 18px;
  height: 18px;
}

.public-register-main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 64px;
}

.public-register-intro {
  margin-bottom: 24px;
}

.public-register-intro > span {
  font-size: 12px;
  font-weight: 800;
  color: #137a55;
}

.public-register-intro h1 {
  margin: 8px 0 10px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

.public-register-intro p {
  max-width: 680px;
  margin: 0;
  color: #596270;
  line-height: 1.55;
}

.public-registration-form {
  background: #fff;
  border: 1px solid #d9dee6;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 28, 36, 0.08);
  overflow: hidden;
}

.public-registration-form section {
  padding: 26px 28px;
  border-bottom: 1px solid #e4e8ee;
}

.public-registration-form h2 {
  margin: 0 0 18px;
  font-size: 17px;
  letter-spacing: 0;
}

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

.public-form-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #394250;
}

.public-form-grid input,
.public-form-grid select,
.public-form-grid textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #cbd2dc;
  border-radius: 6px;
  background: #fff;
  color: #171c24;
  font: inherit;
}

.public-form-grid input,
.public-form-grid select {
  min-height: 44px;
  padding: 0 12px;
}

.public-form-grid textarea {
  padding: 11px 12px;
  resize: vertical;
}

.public-form-grid input:focus,
.public-form-grid select:focus,
.public-form-grid textarea:focus {
  outline: 3px solid rgba(21, 163, 109, 0.16);
  border-color: #15a36d;
}

.public-form-grid .span-2 {
  grid-column: span 2;
}

.public-consent-line {
  margin: 22px 28px 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #394250;
  font-size: 13px;
  line-height: 1.5;
}

.public-consent-line input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #137a55;
}

.registration-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.public-registration-result {
  min-height: 24px;
  margin: 18px 28px 0;
  color: #596270;
  font-size: 13px;
}

.public-registration-result.success,
.public-registration-result.error {
  padding: 12px 14px;
  border-radius: 6px;
}

.public-registration-result.success {
  display: grid;
  gap: 4px;
  background: #e9f7f1;
  color: #0d6948;
}

.public-registration-result.error {
  background: #fff0f0;
  color: #a12626;
}

.public-registration-submit {
  margin: 18px 28px 28px;
  min-height: 46px;
}

.public-registration-submit svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 700px) {
  .public-register-header {
    min-height: 64px;
    padding: 0 18px;
  }

  .public-secure-label {
    display: none;
  }

  .public-register-main {
    width: min(100% - 20px, 920px);
    padding: 28px 0 40px;
  }

  .public-register-intro h1 {
    font-size: 26px;
  }

  .public-registration-form section {
    padding: 22px 18px;
  }

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

  .public-form-grid .span-2 {
    grid-column: auto;
  }

  .public-consent-line,
  .public-registration-result {
    margin-left: 18px;
    margin-right: 18px;
  }

  .public-registration-submit {
    width: calc(100% - 36px);
    margin: 18px;
  }
}

/* ---------- Abonelik takibi ---------- */
#radioSubscriptionsPanel .module-filter-row {
  flex-wrap: wrap;
  align-items: center;
}

.sub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sub-toolbar > label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sub-toolbar select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.sub-segment {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.sub-segment button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sub-segment button + button {
  border-left: 1px solid var(--line);
}

.sub-segment button.active {
  background: var(--sidebar);
  color: #ffffff;
}

.sub-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #ffffff;
}

.sub-summary article {
  display: grid;
  gap: 3px;
  padding: 11px 14px;
}

.sub-summary article + article {
  border-left: 1px solid var(--line);
}

.sub-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.sub-summary strong {
  font-size: 19px;
  line-height: 1.15;
}

.sub-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.sub-summary .attention {
  background: #fff9e8;
}

.sub-summary .attention strong {
  color: var(--red);
}

.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-missing-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #efc7c0;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  background: var(--red-soft);
}

.customer-missing-band div {
  display: grid;
  gap: 3px;
}

.customer-missing-band strong {
  color: var(--red);
}

.customer-missing-band span {
  color: var(--ink-soft);
  font-size: 13px;
}

.form-help.sub-warning {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}

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

  .sub-summary article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

#radioSubscriptionsPanel .module-filter-row {
  flex-direction: column;
  align-items: stretch;
}

#radioSubscriptionsPanel .sub-toolbar .compact-search {
  flex: 1;
  width: auto;
  min-width: 220px;
}

.customer-missing-band {
  margin: 0 0 0;
  border-radius: 0;
  border-left-width: 4px;
  border-right: 0;
  border-top: 0;
}

.customer-missing-band .primary-button {
  flex: none;
  width: auto;
  min-height: 36px;
  white-space: nowrap;
}

.customer-card-dialog .workflow-form footer,
.customer-card-view footer {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 8px;
}

.device-check-warning {
  display: block;
  margin-top: 4px;
  color: var(--amber);
  font-weight: 700;
}
