:root {
  --navy-950: #091827;
  --navy-900: #10243e;
  --navy-800: #173555;
  --navy-700: #245173;
  --blue: #356df3;
  --blue-soft: #eaf0ff;
  --mint: #0f9f76;
  --mint-soft: #e7f7f1;
  --orange: #f08b32;
  --orange-soft: #fff2e6;
  --red: #df5e65;
  --red-soft: #fcebed;
  --yellow: #e0a72e;
  --yellow-soft: #fff6de;
  --ink: #1d2b3f;
  --muted: #78869a;
  --line: #e7ecf3;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --shadow: 0 10px 34px rgba(32, 54, 86, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 14px;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(53, 109, 243, 0.22);
  outline-offset: 2px;
}

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

.sidebar {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: var(--navy-950);
  color: #dce7f3;
  padding: 18px 14px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 22px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #4c8dff, #2fc19a);
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(42, 127, 218, 0.26);
}

.brand-name {
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.brand-caption {
  margin-top: 2px;
  color: #8295ac;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.register-card {
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(61, 127, 234, 0.2), rgba(42, 184, 151, 0.08));
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.register-card .eyebrow {
  color: #91a7bd;
}

.register-title {
  margin-top: 7px;
  color: #fff;
  font-weight: 700;
}

.register-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: #a9bdd0;
  font-size: 11px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #31d3a1;
  box-shadow: 0 0 0 4px rgba(49, 211, 161, 0.12);
}

.nav-section {
  margin: 12px 8px 7px;
  color: #6f849a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #aebdd0;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: #fff;
  color: var(--navy-900);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.13);
}

.nav-item svg,
.top-icon svg,
.btn svg,
.icon-box svg,
.search-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: #dbe8ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.profile .avatar {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.profile-name {
  color: #eff7ff;
  font-size: 12px;
  font-weight: 700;
}

.profile-role {
  margin-top: 2px;
  color: #8295ac;
  font-size: 11px;
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.page-heading h1,
.section-heading h2,
.panel-title,
.modal-title {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.page-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.top-actions,
.toolbar,
.toolbar-actions,
.inline,
.filter-tabs,
.segmented,
.order-id,
.status,
.chip,
.summary-row,
.modal-actions,
.inventory-cell {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 9px;
}

.top-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: #607189;
}

.top-icon:hover {
  color: var(--blue);
  border-color: #cdd9f5;
}

.content {
  padding: 22px 24px 28px;
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  min-height: calc(100vh - 114px);
}

.catalog,
.order-panel,
.panel,
.stat-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.catalog,
.order-panel,
.panel {
  border-radius: 17px;
}

.catalog {
  min-width: 0;
  padding: 18px;
}

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

.section-heading h2 {
  font-size: 18px;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  margin-top: 18px;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  display: grid;
  color: #94a2b5;
  transform: translateY(-50%);
}

.input,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.input {
  height: 42px;
  padding: 0 13px;
}

.search-wrap .input {
  padding-left: 40px;
}

.select {
  height: 38px;
  padding: 0 10px;
}

.input:focus,
.select:focus {
  border-color: #afc4f8;
}

.filter-tabs {
  gap: 7px;
  overflow-x: auto;
  padding: 15px 0 4px;
}

.filter-tab {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #718096;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-tab:hover,
.filter-tab.active {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: #fff;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.menu-card {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: 160ms ease;
}

.menu-card:hover {
  border-color: #bdccf3;
  box-shadow: 0 10px 22px rgba(43, 78, 129, 0.1);
  transform: translateY(-2px);
}

.product-visual {
  display: grid;
  height: 70px;
  place-items: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.94);
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
}

.product-visual svg {
  width: 29px;
  height: 29px;
  stroke-width: 1.8;
}

.menu-card h3 {
  overflow: hidden;
  margin: 11px 0 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-card-foot,
.order-panel-head,
.order-line,
.line-main,
.customer-select,
.summary-row,
.panel-head,
.payment-total,
.receipt-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.menu-price {
  color: var(--navy-900);
  font-weight: 800;
}

.stock {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.stock.low {
  color: var(--orange);
}

.order-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
}

.order-panel-head {
  padding: 17px 17px 12px;
}

.order-panel-tools {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.panel-title {
  font-size: 17px;
}

.order-id {
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cart-clear-all {
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff7f7;
  color: #b42318;
  font-size: 10px;
  font-weight: 800;
}

.cart-clear-all:hover,
.line-clear-btn:hover {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.order-fields {
  padding: 0 17px 13px;
  border-bottom: 1px solid var(--line);
}

.segmented {
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #f4f6fa;
}

.segment {
  flex: 1;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7b899b;
  font-size: 11px;
  font-weight: 700;
}

.segment.active {
  background: #fff;
  color: var(--navy-900);
  box-shadow: 0 3px 9px rgba(50, 69, 96, 0.08);
}

.order-mini-fields {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-top: 10px;
}

.customer-select {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafe;
  color: #65758c;
  font-size: 12px;
}

.cart-lines {
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
  padding: 5px 17px;
}

.empty-cart {
  display: grid;
  min-height: 250px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-cart-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

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

.empty-cart strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.empty-cart span {
  display: block;
  max-width: 180px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.5;
}

.order-line {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.line-main {
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}

.line-visual {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.line-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-price {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 5px;
}

.qty-btn {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #5b6a80;
  font-weight: 800;
}

.qty-btn:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.qty-value {
  min-width: 17px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.line-clear-btn {
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font-size: 10px;
  font-weight: 800;
}

.order-summary {
  padding: 13px 17px 17px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.summary-row {
  padding: 4px 0;
  color: #77859a;
  font-size: 12px;
}

.summary-row strong {
  color: var(--ink);
}

.summary-row.total {
  margin-top: 7px;
  padding-top: 10px;
  border-top: 1px dashed #d9e0ea;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  transition: 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy-900);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-800);
  box-shadow: 0 8px 16px rgba(16, 36, 62, 0.18);
}

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

.btn-soft {
  border-color: var(--line);
  background: #fff;
  color: #65758c;
}

.btn-danger-soft {
  background: var(--red-soft);
  color: var(--red);
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

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

.page-grid {
  display: grid;
  gap: 16px;
}

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

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px;
  border-radius: 15px;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stat-card h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.stat-delta {
  margin-top: 5px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 700;
}

.icon-box {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
}

.icon-box.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.icon-box.green {
  background: var(--mint-soft);
  color: var(--mint);
}

.icon-box.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.icon-box.red {
  background: var(--red-soft);
  color: var(--red);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 16px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  padding: 16px 17px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.chart-wrap {
  padding: 13px 16px 16px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 220px;
}

.chart-grid {
  stroke: #e8edf4;
  stroke-dasharray: 4 5;
}

.chart-label {
  fill: #97a3b3;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
}

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

.chart-area {
  fill: url(#area-fill);
}

.mini-list {
  padding: 5px 16px 12px;
}

.mini-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

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

.mini-rank {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: #f2f5fa;
  color: #708095;
  font-size: 11px;
  font-weight: 800;
}

.mini-copy {
  min-width: 0;
  flex: 1;
}

.mini-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.mini-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.mini-value {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.toolbar {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.toolbar-actions {
  gap: 8px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2387c9;
  font-size: 11px;
  font-weight: 700;
}

.telegram-link svg {
  width: 14px;
  height: 14px;
}

.customer-name-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.customer-name-btn:hover {
  color: var(--blue);
  text-decoration: underline;
}

.customer-detail-page {
  display: grid;
  gap: 16px;
}

.customer-detail-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.customer-detail-toolbar h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 26px;
  letter-spacing: -0.8px;
}

.customer-detail-toolbar p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0 0;
  color: #2387c9;
  font-size: 12px;
  font-weight: 700;
}

.customer-detail-toolbar p svg {
  width: 14px;
  height: 14px;
}

.back-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.detail-card {
  overflow: hidden;
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  padding: 22px 25px 26px;
}

.customer-detail-grid h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-row strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-divider {
  height: 1px;
  margin: 15px 0;
  background: var(--line);
}

.detail-tabs {
  display: flex;
  gap: 22px;
  padding: 0 0 0 5px;
  border-bottom: 1px solid var(--line);
}

.detail-tab {
  padding: 10px 3px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #65758c;
  font-size: 13px;
  font-weight: 700;
}

.detail-tab.active {
  border-color: var(--blue);
  color: var(--blue);
}

.detail-slip-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  background: #fafbfd;
  color: #8a97a8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

td {
  color: #526177;
  font-size: 12px;
}

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

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

.table-primary {
  color: var(--ink);
  font-weight: 700;
}

.table-muted {
  display: block;
  margin-top: 3px;
  color: #9aa6b5;
  font-size: 10px;
}

.status {
  width: fit-content;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.status:before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status.success {
  background: var(--mint-soft);
  color: var(--mint);
}

.status.warning {
  background: var(--yellow-soft);
  color: #b48012;
}

.status.danger {
  background: var(--red-soft);
  color: var(--red);
}

.status.neutral {
  background: #eef2f7;
  color: #718096;
}

.inventory-cell {
  gap: 8px;
}

.progress {
  width: 70px;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #ecf0f5;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}

.progress span.low {
  background: var(--orange);
}

.progress span.critical {
  background: var(--red);
}

.chip {
  width: fit-content;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

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

.report-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.report-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.report-card p {
  margin: 5px 0 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.empty-state {
  padding: 44px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 24, 39, 0.48);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 36, 62, 0.28);
}

.modal-wide {
  width: min(860px, 100%);
}

.product-form-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
}

@supports (height: 100dvh) {
  .product-form-modal {
    max-height: calc(100dvh - 36px);
  }
}

.staff-form-modal,
.role-form-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
}

@supports (height: 100dvh) {
  .staff-form-modal,
  .role-form-modal {
    max-height: calc(100dvh - 36px);
  }
}

.product-form-modal .modal-head,
.product-form-modal .modal-actions,
.staff-form-modal .modal-head,
.staff-form-modal .modal-actions,
.role-form-modal .modal-head,
.role-form-modal .modal-actions {
  flex: 0 0 auto;
}

.product-form-modal .modal-body,
.staff-form-modal .modal-body,
.role-form-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 16px;
  scrollbar-gutter: stable;
}

.modal-head {
  padding: 20px 20px 14px;
}

.modal-title {
  font-size: 19px;
}

.modal-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-body {
  padding: 0 20px 20px;
}

.modal-actions {
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

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

.permission-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  color: var(--ink);
  font-weight: 700;
}

.payment-total {
  margin-bottom: 15px;
  padding: 13px;
  border-radius: 12px;
  background: var(--navy-900);
  color: #fff;
}

.payment-total span {
  color: #b7c7d9;
  font-size: 12px;
}

.payment-total strong {
  font-family: "Manrope", sans-serif;
  font-size: 21px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.payment-method {
  min-height: 68px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #728197;
  font-size: 11px;
  font-weight: 800;
}

.payment-method svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto 6px;
}

.payment-method.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.payment-method:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.credit-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid #d8e3f5;
  border-radius: 10px;
  background: #f7faff;
}

.credit-note span,
.credit-note strong {
  display: block;
}

.integration-body {
  padding: 17px;
}

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

.integration-grid div,
.integration-note {
  padding: 12px;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  background: #f8fbff;
}

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

.integration-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.integration-grid strong {
  overflow: hidden;
  margin-top: 6px;
  color: var(--navy-900);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-note {
  margin-top: 10px;
  color: #607189;
  font-size: 12px;
  line-height: 1.6;
}

.integration-note code {
  color: var(--navy-900);
  font-weight: 800;
}

.slips-toolbar {
  display: flex;
  gap: 7px;
  padding: 0 20px 12px;
}

.slips-list {
  display: grid;
  gap: 8px;
  max-height: 54vh;
  overflow-y: auto;
  padding: 0 20px 18px;
}

.slip-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.slip-copy {
  min-width: 0;
  flex: 1;
}

.slip-copy strong,
.slip-copy span {
  display: block;
}

.slip-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.slip-copy span {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-slip-modal {
  width: min(940px, 100%);
  max-height: 92vh;
  overflow-y: auto;
}

.bank-slip-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
  padding: 0 20px 20px;
}

.bank-slip-preview {
  overflow: hidden;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #fff;
  color: #202631;
  box-shadow: 0 8px 22px rgba(19, 32, 49, 0.08);
}

.bank-slip-brand {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 22px auto 14px;
  place-items: center;
  background: #e31c25;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -1px;
}

.bank-slip-preview p {
  margin: 0 20px 18px;
  color: #282b31;
  font-size: 11px;
  text-align: center;
}

.bank-slip-amount {
  display: grid;
  padding: 16px;
  place-items: center;
  background: repeating-linear-gradient(0deg, #fff, #fff 4px, #f2f3f4 5px, #fff 7px);
}

.bank-slip-amount strong {
  color: #10243e;
  font-size: 30px;
  font-weight: 500;
}

.bank-slip-amount span {
  color: #70757d;
  font-size: 13px;
}

.bank-slip-rows {
  padding: 15px 16px 8px;
}

.bank-slip-rows div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f2;
  font-size: 10px;
}

.bank-slip-rows strong {
  overflow-wrap: anywhere;
  color: #71757d;
  font-weight: 600;
  text-align: right;
}

.bank-slip-rows .success {
  color: #93c62a;
}

.bank-slip-footer {
  margin-top: 8px;
  padding: 16px;
  background: #f6f6f6;
  color: #71757d;
  font-size: 11px;
  text-align: center;
}

.bank-slip-form .integration-note {
  margin-top: 0;
}

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

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

.slip-review-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}

.credit-note span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.credit-note strong {
  margin-top: 5px;
  color: var(--navy-900);
  font-size: 12px;
}

.field {
  margin-top: 13px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: #7f8b9c;
  font-size: 11px;
  font-weight: 700;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.receipt-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint);
}

.receipt-mark svg {
  width: 27px;
  height: 27px;
}

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

.receipt-copy h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 18px;
}

.receipt-copy p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.receipt-complete-modal {
  display: flex;
  width: min(540px, 100%);
  max-height: calc(100vh - 36px);
  flex-direction: column;
}

@supports (height: 100dvh) {
  .receipt-complete-modal {
    max-height: calc(100dvh - 36px);
  }
}

.receipt-complete-head {
  padding: 22px 24px 12px;
  border-bottom: 1px solid #edf2f7;
  background:
    radial-gradient(circle at 50% -24px, rgba(16, 185, 129, 0.18), transparent 120px),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.receipt-complete-head .receipt-mark {
  margin-bottom: 10px;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.16);
}

.receipt-success-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 10px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.receipt-complete-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 18px;
  background: #f8fafc;
}

.receipt-complete-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.receipt-complete-summary div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.receipt-complete-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.receipt-complete-summary strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-preview-shell {
  display: grid;
  margin-top: 14px;
  padding: 16px;
  place-items: center;
  border: 1px solid #dbe7f3;
  border-radius: 18px;
  background: #fff;
}

.receipt-preview-shell .receipt {
  width: min(312px, 100%);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.receipt-complete-actions {
  flex: 0 0 auto;
  padding: 14px 20px;
}

.receipt-complete-actions .btn-primary {
  min-width: 90px;
}

.receipt {
  padding: 12px;
  border: 1px dashed #d5dfea;
  border-radius: 11px;
}

.receipt-line {
  padding: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.receipt-line strong {
  color: var(--ink);
}

.toast-wrap {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 220px;
  padding: 11px 13px;
  border: 1px solid #d7e0eb;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .pos-layout {
    grid-template-columns: minmax(0, 1fr) 332px;
  }

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

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

  .sidebar {
    padding: 15px 9px;
  }

  .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .brand-copy,
  .register-card,
  .nav-section,
  .nav-item span,
  .profile-copy {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 11px;
  }

  .profile {
    justify-content: center;
    padding-inline: 0;
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }

  .order-panel {
    min-height: 560px;
  }

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

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

@media (max-width: 720px) {
  .bank-slip-layout {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: fixed;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    padding: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand,
  .sidebar-footer,
  .nav-item[data-page="expenses"],
  .nav-item[data-page="settings"],
  .nav-item[data-page="reports"] {
    display: none;
  }

  .sidebar nav {
    display: flex;
    width: 100%;
    justify-content: space-around;
  }

  .nav-item {
    width: 52px;
    margin: 0;
  }

  .topbar {
    height: 64px;
    padding: 0 15px;
  }

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

  .top-icon {
    width: 35px;
    height: 35px;
  }

  .content {
    padding: 15px 12px 84px;
  }

  .catalog {
    padding: 14px;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

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

  .menu-card {
    min-height: 143px;
    padding: 10px;
  }

  .stat-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .payment-methods {
    grid-template-columns: repeat(2, 1fr);
  }

  .receipt-complete-summary {
    grid-template-columns: 1fr;
  }

  .receipt-complete-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .receipt-complete-actions .btn {
    flex: 1 1 auto;
  }

  .order-line {
    flex-wrap: wrap;
  }

  .line-clear-btn {
    margin-left: auto;
  }

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

  .customer-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .slip-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

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

.category-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  padding: 16px 17px;
}

.category-admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.category-admin-card strong,
.product-row-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.category-admin-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.product-row-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-row-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

/* Product management page, inspired by standard POS product modules */
.manage-panel {
  background: transparent;
  box-shadow: none;
}

.manage-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.manage-tab {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #66758a;
  font-size: 12px;
  font-weight: 800;
}

.manage-tab:hover,
.manage-tab.active {
  border-color: var(--blue);
  color: var(--ink);
}

.compact-stats {
  margin-bottom: 14px;
}

.manage-toolbar {
  align-items: center;
  margin: 0 0 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: #fff;
}

.manage-toolbar h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.manage-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.manage-search {
  min-width: 260px;
}

.category-toolbar {
  margin-bottom: 0;
}

.category-search-input {
  min-width: 195px;
}

.manage-table-card {
  border: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
  background: #fff;
}

.category-row-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f6f8fb;
  color: #9aa6b5;
}

.category-row-icon .icon {
  width: 15px;
  height: 15px;
}

.categories-table td:last-child {
  white-space: normal;
}

.products-table th,
.products-table td {
  white-space: nowrap;
}

.products-table .row-actions {
  justify-content: flex-start;
}

.icon-only {
  width: 32px;
  padding: 0;
}

.stock.no-track {
  color: var(--mint);
}

.check-field {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfe;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.check-field span {
  display: grid;
  gap: 4px;
}

.check-field strong {
  color: var(--ink);
  font-size: 12px;
}

.check-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.manage-placeholder {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.manage-placeholder span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .manage-toolbar,
  .manage-toolbar .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .manage-search {
    min-width: 0;
    width: 100%;
  }
}

/* Category availability toggle */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch span {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d8dee8;
  transition: background 0.18s ease;
}

.toggle-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(29, 43, 63, 0.2);
  transition: transform 0.18s ease;
  content: "";
}

.toggle-switch input:checked + span {
  background: var(--blue);
}

.toggle-switch input:checked + span::after {
  transform: translateX(16px);
}


/* Expenses module */
.expense-shell {
  display: grid;
  gap: 14px;
}

.expense-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  width: fit-content;
}

.expense-tab {
  min-height: 32px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #68788d;
  font-size: 12px;
  font-weight: 800;
}

.expense-tab.active {
  background: #edf3ff;
  color: var(--blue);
}

.expense-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.expense-header-row h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.expense-header-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.expense-stat-grid .stat-card h3 {
  text-transform: uppercase;
}

.expense-overview-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.compact-panel-head {
  padding-bottom: 0;
}

.expense-chart-panel {
  min-height: 236px;
}

.expense-empty-chart,
.expense-breakdown-empty,
.expense-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.expense-empty-chart {
  min-height: 180px;
  padding: 16px 20px 20px;
}

.expense-chart-lines {
  width: min(100%, 430px);
  height: 90px;
  border-bottom: 1px solid #eef2f7;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) 0 0/100% 22px,
    linear-gradient(90deg, transparent 0, transparent 100%);
  opacity: 0.9;
}

.expense-months {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  width: min(100%, 420px);
  color: #97a4b4;
  font-size: 11px;
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2f5fb;
  color: #9eaabb;
}

.empty-illustration.big {
  width: 66px;
  height: 66px;
  border: 7px solid #eef4ff;
  background: #f8fbff;
  color: var(--blue);
}

.empty-illustration .icon {
  width: 18px;
  height: 18px;
}

.empty-illustration.big .icon {
  width: 26px;
  height: 26px;
}

.entries-head {
  align-items: center;
}

.expense-entries-panel .panel-head,
.expense-table-panel .panel-head {
  padding-bottom: 0;
}

.expense-empty-state {
  min-height: 210px;
  padding: 24px;
}

.upload-prompt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cfd8ff;
  border-radius: 16px;
  background: #f6f7ff;
}

.upload-prompt-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c41e8, #b795ff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(104, 72, 220, 0.22);
}

.upload-prompt strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
}

.upload-prompt span {
  color: #627388;
  font-size: 12px;
}

.modal-head-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.grouped-field {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
}

.simple-check {
  padding: 0;
  border: 0;
  background: transparent;
}

.expense-form-3 {
  grid-template-columns: 1.1fr 0.8fr 0.9fr;
}

.expense-table-panel {
  overflow: hidden;
}

.vendor-stat-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 980px) {
  .expense-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .expense-header-row,
  .expense-header-row .toolbar-actions,
  .entries-head,
  .entries-head .toolbar-actions,
  .modal-head-split,
  .upload-prompt {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .expense-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .expense-form-3,
  .vendor-stat-grid {
    grid-template-columns: 1fr;
  }
}


/* Real expense charts, filters, bill upload, and entry actions */
.expense-bar-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(56px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 184px;
  padding: 18px 22px 20px;
}

.expense-bar-item {
  display: grid;
  grid-template-rows: 24px 110px 18px;
  align-items: end;
  gap: 7px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.expense-bar-value {
  min-height: 18px;
  color: var(--ink);
  font-size: 10px;
}

.expense-bar-track {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  height: 110px;
  border-radius: 12px;
  background: #f3f6fb;
  overflow: hidden;
}

.expense-bar-track span {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #2f6df6, #7ca8ff);
}

.expense-category-chart {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.expense-category-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 1.4fr 44px;
  gap: 12px;
  align-items: center;
}

.expense-category-row strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.expense-category-row span {
  color: var(--muted);
  font-size: 11px;
}

.expense-category-row b {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

.expense-category-meter {
  height: 9px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.expense-category-meter span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6df6, #83adff);
}

.status-action {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.products-table td .btn.btn-sm {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .expense-bar-chart {
    grid-template-columns: repeat(6, 72px);
    overflow-x: auto;
  }

  .expense-category-row {
    grid-template-columns: 1fr;
  }

  .status-action {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Live Orders / rush-time ticket queue */
.live-orders-panel {
  overflow: hidden;
}

.live-orders-head {
  align-items: center;
}

.live-order-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 17px 16px;
}

.live-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 14px;
  padding: 0 17px 17px;
}

.ticket-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(25, 42, 70, 0.05);
}

.ticket-card.active {
  border-color: var(--blue);
  box-shadow: 0 10px 28px rgba(47, 109, 246, 0.13);
}

.ticket-card-head,
.ticket-meta-row,
.ticket-items div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-card-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.ticket-card-head span,
.ticket-meta-row span,
.ticket-items small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ticket-meta-row b {
  color: var(--ink);
  font-size: 16px;
}

.ticket-items {
  display: grid;
  gap: 7px;
  padding: 11px;
  border-radius: 13px;
  background: #f7f9fc;
}

.ticket-items div span {
  color: #56667d;
  font-size: 12px;
  font-weight: 700;
}

.ticket-items div strong {
  color: var(--ink);
  font-size: 12px;
}

.ticket-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.active-ticket-pill {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: -6px 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ticket-action-grid {
  grid-template-columns: repeat(2, 1fr);
}

.ticket-action-grid .btn-primary {
  grid-column: 1 / -1;
}

.status.blue {
  background: #edf3ff;
  color: var(--blue);
}

.live-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fbfcfe;
}

@media (max-width: 760px) {
  .live-orders-head,
  .live-orders-head .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-action-grid {
    grid-template-columns: 1fr;
  }
}


/* Paid order protection / manager edit */
.order-actions {
  gap: 6px;
  min-width: 260px;
}

.order-detail-items {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.audit-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.audit-box > strong {
  color: var(--ink);
  font-size: 13px;
}

.audit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.audit-row span,
.audit-row small {
  color: var(--muted);
  font-size: 11px;
}

.audit-row b {
  color: var(--ink);
  font-size: 12px;
}

.audit-row small {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .order-actions {
    min-width: 0;
  }

  .audit-row {
    grid-template-columns: 1fr;
  }
}


/* Searchable customer field in POS */
.customer-search-field {
  position: relative;
  min-width: 0;
}

.customer-search-input {
  width: 100%;
  padding-right: 34px;
}

.customer-clear-btn {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #edf1f7;
  color: #6d7c90;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
}

.customer-clear-btn:hover {
  background: var(--red-soft);
  color: var(--red);
}


/* Fixed POS customer search results */
.customer-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 38, 70, 0.18);
}

.customer-result {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.customer-result:hover {
  background: #f4f7fc;
}

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

.customer-result span,
.customer-no-result {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.customer-no-result {
  padding: 10px;
  text-align: center;
}


/* Customer payment modal - outstanding orders */
.customer-payment-orders {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
}

.customer-payment-orders-head,
.customer-payment-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-payment-orders-head strong {
  color: var(--ink);
  font-size: 13px;
}

.customer-payment-orders-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.customer-payment-order {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.customer-payment-order.selected {
  border-color: var(--blue);
  background: #f3f7ff;
}

.customer-payment-order div {
  display: grid;
  gap: 3px;
}

.customer-payment-order strong,
.customer-payment-order b {
  color: var(--ink);
  font-size: 13px;
}

.customer-payment-order span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.small-empty {
  min-height: 84px;
}

@media (max-width: 760px) {
  .customer-payment-orders-head,
  .customer-payment-order {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Customer payment selection controls */
.customer-payment-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 0 6px;
}

.customer-payment-order.selectable {
  cursor: pointer;
  grid-template-columns: auto 1fr auto;
}

.customer-payment-order input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.customer-payment-order.selectable:hover {
  border-color: var(--blue);
  background: #f6f9ff;
}

@media (max-width: 760px) {
  .customer-payment-order.selectable {
    grid-template-columns: auto 1fr;
  }

  .customer-payment-order.selectable > div:last-child {
    grid-column: 1 / -1;
  }
}


/* Customer details order editing actions */
.customer-order-actions {
  min-width: 360px;
  gap: 6px;
}

@media (max-width: 760px) {
  .customer-order-actions {
    min-width: 0;
  }
}


/* Day End / Close Register */
.day-end-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  border-color: rgba(239, 68, 68, 0.24);
  background: #fff7f7;
}

.day-end-warning strong {
  display: block;
  color: var(--red);
  font-size: 14px;
}

.day-end-warning span {
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 700;
}

.day-end-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-top: 16px;
}

.day-end-reconcile {
  display: grid;
  gap: 8px;
  padding: 0 17px 17px;
}

.day-end-row {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(140px, 0.9fr) minmax(120px, 0.8fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.day-end-row.header {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.day-end-row span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.day-end-form,
.day-end-summary-list {
  display: grid;
  gap: 10px;
  padding: 0 17px 17px;
}

.day-end-summary-list .detail-row,
.day-end-form .detail-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.day-end-confirm {
  margin: 0 17px 17px;
}

.day-end-report-grid {
  display: grid;
  gap: 12px;
  padding: 0 17px 17px;
}

.day-end-report-card {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 0.8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.day-end-report-card div {
  display: grid;
  gap: 3px;
}

.day-end-report-card strong,
.day-end-report-card b {
  color: var(--ink);
  font-size: 13px;
}

.day-end-report-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .day-end-grid {
    grid-template-columns: 1fr;
  }

  .day-end-report-card,
  .day-end-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .day-end-warning {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Open Register / locked POS */
.register-card.closed {
  background: #fff7f7;
  border-color: rgba(239, 68, 68, 0.22);
}

.live-dot.closed {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.register-closed-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  text-align: center;
}

.register-lock-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: #edf3ff;
  color: var(--blue);
}

.register-lock-icon .icon {
  width: 30px;
  height: 30px;
}

.register-closed-panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 24px;
}

.register-closed-panel p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.open-register-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  text-align: left;
}

.open-register-form .field:last-child {
  grid-column: 1 / -1;
}

.day-end-open-register {
  max-width: none;
  margin: 0 0 16px;
}

.day-end-open-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-color: rgba(34, 197, 94, 0.25);
  background: #f3fff8;
}

.day-end-open-status strong {
  display: block;
  color: #166534;
  font-size: 14px;
}

.day-end-open-status span {
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .open-register-form {
    grid-template-columns: 1fr;
  }
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}
.telegram-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
@media (max-width: 640px) {
  .copy-row { grid-template-columns: 1fr; }
}

.telegram-slip-image {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  background: #f8fafc;
  border-bottom: 1px solid #eef1f5;
}

.slip-review-meta .btn {
  white-space: nowrap;
}

.link-pill {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.link-pill:hover {
  border-color: var(--blue);
}

.ocr-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.ocr-status.loading { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.ocr-status.success { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.ocr-status.warning { background: rgba(245, 158, 11, 0.14); color: #92400e; }
.ocr-status.error { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.ocr-raw-details { margin-top: 12px; font-size: 12px; color: var(--muted); }
.ocr-raw-details summary { cursor: pointer; font-weight: 800; margin-bottom: 8px; }
.ocr-raw-details textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; resize: vertical; }

.original-slip-only {
  min-height: 520px;
  align-items: stretch;
  justify-content: flex-start;
}

.original-slip-image {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.original-slip-missing {
  min-height: 360px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--soft);
  padding: 24px;
}

.original-slip-missing strong {
  color: var(--ink);
}

/* POS login page */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%), var(--canvas);
}
.login-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.login-brand h1 {
  margin: 0;
  font-size: 28px;
}
.login-brand p,
.login-hint {
  margin: 4px 0 0;
  color: var(--muted);
}
.login-submit {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  padding: 12px 0;
}
.checkbox-row input {
  width: 18px;
  height: 18px;
}

/* POS/mini app icon display controls */
.product-row-image-icon,
.category-row-image-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface-soft, #f3f4f6);
  margin-right: 10px;
  vertical-align: middle;
}
.product-row-image-icon img,
.category-row-image-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-visual-image-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  overflow: hidden;
  background: var(--surface-soft, #f3f4f6);
  align-items: center;
  justify-content: center;
}
.product-visual-image-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Split table bill workflow */
.split-bill-panel .split-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.split-bill-panel .inner-panel {
  box-shadow: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.split-bill-panel .split-select {
  min-width: 160px;
}
.split-actions {
  margin-top: 16px;
}
@media (max-width: 900px) {
  .split-bill-panel .split-two-column {
    grid-template-columns: 1fr;
  }
}

.cash-count-grid {
  display: grid;
  gap: 8px;
  padding: 18px;
}
.cash-count-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 90px 110px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: var(--panel-soft, rgba(255,255,255,.55));
}
.cash-count-row.header {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
  background: transparent;
  border: 0;
  padding-bottom: 0;
}
.cash-count-denom { font-weight: 700; }
.cash-count-input { min-width: 0; text-align: center; }
.day-end-counted-total { font-weight: 800; }
@media (max-width: 720px) {
  .cash-count-row { grid-template-columns: 1fr 72px 92px; }
}

.readonly-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted, #64748b);
  font-size: 13px;
  font-weight: 700;
}

.day-end-row.read-only-payment {
  opacity: 0.95;
}

/* Receipt / bill print format update */
.receipt-brand {
  display: grid;
  gap: 2px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, .22);
  margin-bottom: 8px;
}
.receipt-brand strong { font-size: 18px; }
.receipt-brand span { color: var(--muted); font-size: 12px; }
.receipt-items {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px dashed rgba(15, 23, 42, .18);
  border-bottom: 1px dashed rgba(15, 23, 42, .18);
  margin: 8px 0;
}
.receipt-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}
.receipt-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.receipt-line.total {
  font-size: 18px;
  border-top: 1px solid rgba(15, 23, 42, .14);
  padding-top: 8px;
}
.receipt-footer {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media print {
  body * { visibility: hidden !important; }
  .modal, .modal * { visibility: visible !important; }
  .modal { position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; box-shadow: none !important; }
  .modal-actions, .modal-head .btn { display: none !important; }
  .receipt-complete-summary,
  .receipt-success-pill { display: none !important; }
  .receipt-complete-body,
  .receipt-preview-shell { padding: 0 !important; border: 0 !important; background: #fff !important; }
  .receipt { border: none !important; box-shadow: none !important; }
}

/* Editable receipt/bill settings */
.receipt-logo {
  max-width: 76px;
  max-height: 76px;
  object-fit: contain;
  margin: 0 auto 6px;
  display: block;
}
.printable-receipt.receipt-paper-58mm { max-width: 58mm; }
.printable-receipt.receipt-paper-80mm { max-width: 80mm; }
.printable-receipt.receipt-paper-A4 { max-width: 190mm; }
@media print {
  .printable-receipt.receipt-paper-58mm { width: 58mm; max-width: 58mm; }
  .printable-receipt.receipt-paper-80mm { width: 80mm; max-width: 80mm; }
  .printable-receipt.receipt-paper-A4 { width: 190mm; max-width: 190mm; }
}
.receipt-bank {
  margin: 12px 0;
  padding: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
}
.receipt-bank > strong { display:block; margin-bottom: 6px; }
.receipt-bank small { display:block; margin-top:6px; color: var(--muted); line-height: 1.35; }


/* Receipt customization options */
.printable-receipt.receipt-theme-compact {
  padding: 10px;
}
.printable-receipt.receipt-theme-bold .receipt-brand strong,
.printable-receipt.receipt-theme-bold .receipt-line.total strong {
  font-weight: 900;
}
.printable-receipt.receipt-size-small {
  font-size: 11px;
}
.printable-receipt.receipt-size-large {
  font-size: 15px;
}
.printable-receipt.receipt-align-left .receipt-brand {
  text-align: left;
  align-items: flex-start;
}
.receipt-divider {
  border-top: 1px dashed rgba(15, 23, 42, 0.28);
  margin: 8px 0;
}
.receipt-copy-label {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 700;
}
.receipt-qr-block {
  border: 1px dashed rgba(37, 99, 235, 0.45);
  border-radius: 12px;
  padding: 10px;
  margin-top: 10px;
  display: grid;
  gap: 4px;
  text-align: center;
}
.receipt-qr-block span {
  word-break: break-word;
  color: #475569;
}

.compact-report-card {min-height: 100px;}
.compact-report-card p {font-size: 1.05rem; font-weight: 700; color: var(--ink);}


/* Settings dropdown/sub-settings */
.nav-item .nav-caret {
  margin-left: auto;
  font-size: 0.82rem;
  opacity: 0.75;
}
.nav-submenu {
  display: none;
  margin: 2px 0 8px 12px;
  padding-left: 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}
.nav-submenu.open {
  display: grid;
  gap: 4px;
}
.nav-subitem {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}
.nav-subitem svg {
  width: 16px;
  height: 16px;
}
.nav-subitem:hover,
.nav-subitem.active {
  color: var(--ink);
  background: rgba(37, 99, 235, 0.09);
}
.settings-section-tabs {
  padding: 12px;
}
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.settings-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 14px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-weight: 700;
}
.settings-tab svg {
  width: 16px;
  height: 16px;
}
.settings-tab.active,
.settings-tab:hover {
  color: var(--ink);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}

.subsection-title {
  margin: 22px 0 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.settings-grid-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

/* Settings sidebar simplified: sub-settings stay inside Settings page only */
.sidebar .nav-submenu {
  display: none !important;
}
.sidebar .nav-caret {
  display: none !important;
}
