* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-hover: #243044;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --radius: 10px;
  --font: 'Segoe UI', system-ui, sans-serif;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  min-width: 0;
  overflow-x: hidden;
}

.receipt-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background: var(--surface);
  border-left: 1px solid var(--surface-hover);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  z-index: 900;
  flex-direction: column;
  overflow: hidden;
}
.receipt-panel.is-open {
  display: flex;
}
.receipt-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--surface-hover);
  flex-shrink: 0;
}
.receipt-panel-title {
  font-size: 1.15rem;
  font-weight: 600;
}
.receipt-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.receipt-panel-close:hover {
  color: var(--text);
}
.receipt-panel-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 0.75rem;
}
.receipt-panel-list .receipt-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-hover);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  position: relative;
}
.receipt-panel-list .receipt-item:last-child {
  margin-bottom: 0;
}
.receipt-panel-list .receipt-item-content {
  flex: 1;
  min-width: 0;
  padding-right: 2rem;
}
.receipt-panel-list .receipt-item-name {
  font-weight: 500;
}
.receipt-panel-list .receipt-item-device,
.receipt-panel-list .receipt-item-workdone {
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.receipt-panel-list .receipt-item-workdone-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.receipt-panel-list .receipt-item-workdone-row .receipt-item-workdone {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}
.receipt-panel-list .receipt-item-workdone-row .receipt-item-price {
  flex-shrink: 0;
  margin-top: 0;
  margin-left: auto;
  margin-right: -2rem;
  text-align: right;
}
.receipt-panel-list .receipt-item-workdone {
  margin-top: 0.25rem;
  color: var(--text-muted);
  white-space: pre-line;
}
.receipt-panel-list .receipt-item-meta-label {
  font-weight: 500;
  color: var(--text);
}
.receipt-panel-list .receipt-item-price {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
  text-align: right;
}
.receipt-panel-list .receipt-item-prepayment {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}
.receipt-panel-list .receipt-item-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  flex-shrink: 0;
  width: 1.16rem;
  height: 1.16rem;
  padding: 0;
  border: none;
  background: rgba(248, 81, 73, 0.2);
  color: var(--danger);
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
}
.receipt-panel-list .receipt-item-remove:hover {
  background: var(--danger);
  color: #fff;
}
.receipt-panel-list .receipt-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem;
  text-align: center;
}
.receipt-panel-total {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--surface-hover);
  font-weight: 600;
  font-size: 1rem;
}
.receipt-panel-total[aria-hidden="true"]:empty {
  display: none;
}
.receipt-panel-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--surface-hover);
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
}
.receipt-panel-footer .btn-receipt-card {
  flex: 1;
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
}
.receipt-panel-footer .btn-receipt-card:hover {
  background: #16a34a;
}
.receipt-panel-footer .btn-receipt-cash {
  flex: 1;
  background: #eab308;
  color: #000;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
}
.receipt-panel-footer .btn-receipt-cash:hover {
  background: #ca8a04;
}

.receive-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background: var(--surface);
  border-left: 1px solid var(--surface-hover);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  z-index: 900;
  flex-direction: column;
  overflow: hidden;
}
.receive-panel.is-open {
  display: flex;
}
.receive-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--surface-hover);
  flex-shrink: 0;
}
.receive-panel-title {
  font-size: 1.15rem;
  font-weight: 600;
}
.receive-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.receive-panel-close:hover {
  color: var(--text);
}
.receive-panel-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 0.75rem;
}
.receive-panel-list .receive-panel-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-hover);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  position: relative;
}
.receive-panel-list .receive-panel-item-clickable {
  cursor: pointer;
}
.receive-panel-list .receive-panel-item-clickable:hover {
  background: var(--surface-hover);
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.receive-panel-list .receive-panel-item-term {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.receive-panel-list .receive-panel-item:last-child {
  margin-bottom: 0;
}
.receive-panel-list .receive-panel-item-content {
  flex: 1;
  min-width: 0;
  padding-right: 2rem;
}
.receive-panel-list .receive-panel-item-name {
  font-weight: 500;
}
.receive-panel-list .receive-panel-item-qty {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.receive-panel-list .receive-panel-item-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: rgba(248, 81, 73, 0.2);
  color: var(--danger);
  border-radius: 4px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.receive-panel-list .receive-panel-item-remove:hover {
  background: rgba(248, 81, 73, 0.35);
}
.receive-panel-list .receive-panel-empty {
  color: var(--text-muted);
  padding: 0.75rem;
  font-size: 0.9rem;
}
.receive-panel-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--surface-hover);
  flex-shrink: 0;
}
.receive-panel-footer .receive-panel-confirm {
  width: 100%;
}

.sales-history-view {
  margin-top: 0.5rem;
  width: 100%;
}
.sales-history-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}
.sales-history-line {
  width: 100%;
  background: var(--surface-hover);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}
.sales-history-line-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
}
.sales-history-line-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  min-width: 140px;
}
.sales-history-line-number {
  font-weight: 600;
  font-size: 0.9rem;
}
.sales-history-line-type {
  font-weight: 500;
  min-width: 80px;
}
.sales-history-line-total {
  font-weight: 600;
  color: var(--accent);
  margin-left: auto;
}
.sales-history-line-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sales-history-line-details {
  display: none;
  padding: 0 0.75rem 0.5rem;
  padding-left: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sales-history-line.is-expanded .sales-history-line-details {
  display: block;
}
.sales-history-pos {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
}
.sales-history-empty {
  color: var(--text-muted);
  padding: 1rem;
  font-size: 0.95rem;
}

.header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-hover);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

.admin-notifications-block {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: auto;
}

.admin-notifications-block:empty {
  display: none !important;
}

.admin-notification-item {
  position: relative;
  padding: 0.875rem 2rem 0.875rem 1rem;
  background: rgba(220, 53, 69, 0.12);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(220, 53, 69, 0.25);
  border-left: 4px solid #dc3545;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
}

.admin-notification-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-notification-close:hover {
  background: rgba(0, 0, 0, 0.35);
}

.admin-notification-text {
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-notification-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.main {
  display: grid;
  gap: 2rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .main {
    grid-template-columns: 340px 1fr;
  }
}

.main-list-only {
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: -0.5rem;
}

.form-section,
.orders-section,
.products-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
  overflow: visible;
}


.form-section h2,
.orders-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.order-form .form-row {
  margin-bottom: 1rem;
}

.order-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.order-form input,
.order-form textarea,
.order-form select {
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.order-form input:focus,
.order-form textarea:focus,
.order-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.order-form textarea {
  resize: vertical;
  min-height: 60px;
}

.order-form input.handover-field-readonly {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: default;
}

.form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.handover-order-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.handover-order-header .handover-header-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.handover-order-header .handover-header-label {
  font-size: 0.85rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.6));
}
.handover-order-header .handover-header-value {
  font-weight: 500;
}

.handover-lines-wrap {
  margin-bottom: 0.5rem;
}
.handover-lines-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.handover-line-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.handover-line-block:last-child {
  border-bottom: none;
}
.handover-line-block .handover-block-row-1.form-row-workdone {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.handover-line-block .handover-block-row-1 .handover-workdone-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.handover-line-block .handover-block-row-1 .workdone-field-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.handover-line-block .handover-block-row-1 .workdone-field-wrap input {
  flex: 1;
  min-width: 0;
}
.handover-line-block .handover-block-row-1 .handover-remove-line-btn {
  flex-shrink: 0;
  margin-top: calc(0.15rem - 7px);
}
.handover-cost-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}
.handover-cost-price-row .handover-cost-cell,
.handover-cost-price-row .handover-price-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.handover-block-row-3 {
  display: flex;
  align-items: center;
}
.handover-add-line-btn,
.handover-remove-line-btn {
  white-space: nowrap;
}
.handover-block-row-3.handover-add-row {
  margin-top: 0.25rem;
}

.handover-cost-price-row label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.handover-cost-price-row input {
  width: 100%;
  box-sizing: border-box;
}

.form-row-workdone {
  position: relative;
}

.workdone-field-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.workdone-field-wrap input {
  flex: 1;
  min-width: 0;
}

.workdone-field-wrap .workdone-save-template {
  flex-shrink: 0;
}

.field-with-template-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.field-with-template-wrap > input,
.field-with-template-wrap > textarea,
.field-with-template-wrap > select {
  flex: 1;
  min-width: 0;
}
.field-with-template-wrap .field-template-save-btn {
  flex-shrink: 0;
}

.workdone-autocomplete-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  max-height: 12rem;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.workdone-autocomplete-dropdown.is-open {
  display: block;
}

.workdone-autocomplete-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.workdone-autocomplete-item:last-child {
  border-bottom: none;
}

.workdone-autocomplete-item:hover,
.workdone-autocomplete-item.highlight {
  background: var(--surface-hover);
}

.btn {
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  margin-top: 0.5rem;
  width: 100%;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  margin-top: 0.75rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.orders-add-below {
  margin-bottom: 1rem;
  display: flex;
  justify-content: flex-start;
}
.products-add-below {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}
.warehouse-view {
  padding-top: 0.5rem;
}
.warehouse-view-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}
.warehouse-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.warehouse-add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 120px;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.warehouse-add-card:hover {
  border-color: var(--accent);
  background: rgba(76, 175, 80, 0.08);
  transform: translateY(-2px);
}
.warehouse-add-card-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}
.warehouse-add-card-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.warehouse-add-card-icon-svg svg {
  display: block;
}
.warehouse-add-card-title {
  font-weight: 500;
  text-align: center;
}

.warehouse-delete-card:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.warehouse-delete-card .warehouse-add-card-icon {
  color: #ef4444;
}

.warehouse-move-card:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.warehouse-move-card .warehouse-add-card-icon {
  color: #3b82f6;
}

.warehouse-receive-card:hover {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.warehouse-receive-card .warehouse-add-card-icon {
  color: #22c55e;
}

.warehouse-writeoff-card:hover {
  border-color: #ea580c;
  background: rgba(234, 88, 12, 0.08);
}

.warehouse-writeoff-card .warehouse-add-card-icon {
  color: #ea580c;
}

.warehouse-inventory-card:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.warehouse-inventory-card .warehouse-add-card-icon {
  color: #6366f1;
}

.move-product-search-row {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.move-product-search-row input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.move-product-search-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.move-product-content {
  margin-top: 1rem;
}

.move-product-empty {
  color: var(--text-muted);
  margin: 0;
}

.move-product-list {
  max-height: 60vh;
  overflow-y: auto;
}

.move-product-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.move-product-row:last-child {
  border-bottom: none;
}

.move-product-date {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-width: 8rem;
}

.move-product-action {
  flex-shrink: 0;
  font-weight: 500;
  min-width: 6rem;
}

.move-product-name {
  flex: 1;
  min-width: 0;
}

.move-product-details {
  width: 100%;
  margin-top: 0.25rem;
  padding-left: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.receive-product-form-fields {
  margin-bottom: 1rem;
}
.receive-product-form-fields .form-row {
  margin-bottom: 0.75rem;
}
.receive-product-form-fields .form-row label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.receive-product-form-fields .form-row input,
.receive-product-form-fields .form-row textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  box-sizing: border-box;
}
.receive-product-form-fields .form-row input:focus,
.receive-product-form-fields .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.receive-product-form-fields .form-row input.receive-product-auto-date {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: default;
}

#receive-term-modal .form-row {
  margin-bottom: 1rem;
}
#receive-term-modal .form-row label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
#receive-term-modal #receive-term-date {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  box-sizing: border-box;
}
.receive-term-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: flex-end;
}

.receive-product-search-row {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.receive-product-search-row input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.receive-product-search-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.receive-product-list {
  margin-top: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}

.receive-product-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.receive-product-row:last-child {
  border-bottom: none;
}

.receive-product-name {
  flex: 1;
  min-width: 0;
}

.receive-product-qty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.receive-product-input {
  width: 5rem;
  height: 2.25rem;
  box-sizing: border-box;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: right;
}

.receive-product-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 6px;
  margin-top: -1px;
}

.receive-product-btn-plus {
  display: block;
  transform: translateY(-2px);
}

.receive-product-empty {
  color: var(--text-muted);
  margin: 1rem 0;
}

.writeoff-product-search-row {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.writeoff-product-search-row input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.writeoff-product-search-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.writeoff-product-list {
  margin-top: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}

.writeoff-product-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.writeoff-product-row:last-child {
  border-bottom: none;
}

.writeoff-product-name {
  flex: 1;
  min-width: 0;
}

.writeoff-product-qty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.writeoff-product-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.writeoff-product-input {
  width: 5rem;
  height: 2.25rem;
  box-sizing: border-box;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: right;
}

.writeoff-product-row .writeoff-product-btn,
.writeoff-product-row .writeoff-product-add-btn {
  flex-shrink: 0;
  height: 2.25rem;
  padding: 0.35rem 0.75rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.2;
}

.writeoff-pending-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.writeoff-pending-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.writeoff-pending-list {
  max-height: 25vh;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}

.writeoff-pending-row {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.writeoff-pending-row:last-child {
  border-bottom: none;
}

.writeoff-pending-name {
  flex: 1;
  min-width: 0;
}

.writeoff-pending-qty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.writeoff-pending-remove {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: rgba(248, 81, 73, 0.2);
  color: var(--danger);
  border-radius: 6px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.writeoff-pending-remove:hover {
  background: rgba(248, 81, 73, 0.35);
}

.writeoff-one-reason-row {
  margin-top: 0.5rem;
}

.writeoff-one-reason-btn {
  width: 100%;
}

.writeoff-product-empty {
  color: var(--text-muted);
  margin: 1rem 0;
}

.inventory-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

.inventory-product-search-row {
  margin-bottom: 0.75rem;
}

.inventory-product-search-row input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.inventory-product-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.inventory-product-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem 1rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.inventory-col-name { min-width: 0; }
.inventory-col-system { width: 5rem; text-align: right; }
.inventory-col-actual { width: 6rem; text-align: right; }

.inventory-product-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.inventory-product-row:last-child {
  border-bottom: none;
}

.inventory-product-name {
  min-width: 0;
}

.inventory-product-system {
  width: 5rem;
  text-align: right;
  color: var(--text-muted);
}

.inventory-product-input {
  width: 5rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 0.95rem;
  text-align: right;
  box-sizing: border-box;
}

.inventory-product-empty {
  color: var(--text-muted);
  margin: 1rem 0;
}

.inventory-actions {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#writeoff-reason-modal .form-row {
  margin-bottom: 0.5rem;
}

#writeoff-reason-modal .form-row label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

#writeoff-reason-modal #writeoff-reason-input {
  width: 100%;
  min-height: 88px;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: inherit;
}

#writeoff-reason-modal #writeoff-reason-input:focus {
  outline: none;
  border-color: var(--accent);
}

.writeoff-reason-hint {
  color: #ef4444;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.writeoff-reason-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: flex-end;
}

.delete-product-search-row {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.delete-product-search-row input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  box-sizing: border-box;
}

.delete-product-search-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.delete-product-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 1rem;
}

.delete-product-empty {
  color: var(--text-muted);
  margin: 1rem 0;
}

.delete-product-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.delete-product-row:last-child {
  border-bottom: none;
}

.delete-product-name {
  flex: 1;
  min-width: 0;
}

.delete-product-price {
  color: var(--text-muted);
  flex-shrink: 0;
}

.delete-product-btn,
.btn-danger {
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.delete-product-btn:hover,
.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

#delete-reason-modal .form-row {
  margin-bottom: 0.5rem;
}

#delete-reason-modal .form-row label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

#delete-reason-modal #delete-reason-input {
  width: 100%;
  min-height: 88px;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

#delete-reason-modal #delete-reason-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

#delete-reason-modal #delete-reason-input:focus {
  outline: none;
  border-color: var(--accent);
}

.delete-reason-hint {
  color: #ef4444;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.delete-reason-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: flex-end;
}

.btn-products-till {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.btn-products-till:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}
.btn-products-till .btn-products-till-icon {
  display: block;
  flex-shrink: 0;
}
.btn-products-till .btn-products-till-text {
  white-space: nowrap;
}
.btn-products-clock {
  height: 52px;
  padding: 0 1rem;
  border: none;
  border-radius: 10px;
  background: #eab308;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.btn-products-clock .btn-products-clock-icon {
  display: block;
  flex-shrink: 0;
  transform: translate(-1px, -1px);
}
.btn-products-clock .btn-products-clock-text {
  white-space: nowrap;
  font-weight: 500;
}
.btn-products-clock:hover {
  background: #ca8a04;
  transform: scale(1.05);
}

.btn-products-home {
  height: 52px;
  padding: 0 1rem;
  border: none;
  border-radius: 10px;
  background: #92400e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.btn-products-home .btn-products-home-icon {
  display: block;
  flex-shrink: 0;
  transform: translate(-1px, -1px);
}
.btn-products-home .btn-products-home-text {
  white-space: nowrap;
  font-weight: 500;
}
.btn-products-home:hover {
  background: #b45309;
  transform: scale(1.05);
}

.orders-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.orders-add-wrap {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.orders-add-wrap .btn-ruble-order {
  margin-left: 0.5rem;
}
.orders-add-wrap .btn-stats {
  margin-left: auto;
}
.orders-add-wrap .btn-cassa {
  margin-left: 0.5rem;
}

.btn-orders-list {
  width: 52px;
  height: 52px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #3d8ae6;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.btn-orders-list .btn-orders-list-icon {
  display: block;
  margin: 0 auto;
  transform: translateX(-2px);
}
.btn-orders-list:hover {
  background: #2d7ad6;
  transform: scale(1.05);
}

.btn-add-order {
  width: 52px;
  height: 52px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0;
  line-height: 1;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.btn-add-order::before {
  content: '+';
  font-size: 1.75rem;
  line-height: 1;
  transform: translateY(calc(-0.12em - 2px));
}

.btn-add-order:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}
.btn-add-order:hover::before {
  transform: translateY(calc(-0.12em - 2px));
}

.btn-ruble-order {
  width: 52px;
  height: 52px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #22c55e;
  color: #fff;
  font-size: 0;
  line-height: 1;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.btn-ruble-order::before {
  content: '₽';
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  transform: translateY(-0.12em);
}
.btn-ruble-order:hover {
  background: #16a34a;
  transform: scale(1.05);
}
.btn-ruble-order:hover::before {
  transform: translateY(-0.12em);
}

.btn-cassa {
  width: 52px;
  height: 52px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #3d8ae6;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-left: auto;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.btn-cassa .btn-cassa-icon {
  display: block;
}
.btn-cassa:hover {
  background: #2d7ad6;
  transform: scale(1.05);
}

.btn-stats {
  width: 52px;
  height: 52px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #3d8ae6;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-stats .btn-stats-icon {
  display: block;
}
.btn-stats:hover {
  background: #2d7ad6;
  transform: scale(1.05);
}

/* Модальное окно */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: min(400px, calc(100vw - 2rem));
  width: 100%;
}

.warehouse-modal .modal-box {
  max-width: min(800px, 95vw);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-height: min(90vh, calc(100vh - 2rem));
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  margin: auto;
  flex-shrink: 0;
}

.cassa-modal-box {
  max-width: min(360px, 95vw);
}

.stats-section {
  padding-top: 0.25rem;
}

.stats-modal-box {
  max-width: min(560px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

.stats-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.stats-date-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stats-date-field label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stats-date-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.stats-summary {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

.stats-summary-row {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.stats-summary-row:last-child {
  margin-bottom: 0;
}

.stats-summary-label {
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.stats-no-range {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stats-chart-wrap {
  margin-bottom: 1.5rem;
}

.stats-chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 120px;
  padding: 0.5rem 0;
}

.stats-bar-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stats-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  background: #3d8ae6;
  transition: height 0.2s ease;
}

.stats-bar-revenue {
  background: #2e7d32;
}

.stats-bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

.stats-chart-empty {
  margin: 0;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats-pie-chart-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}

.stats-pie-wrap {
  flex-shrink: 0;
}

.stats-pie {
  width: 220px;
  height: 220px;
  max-width: 100%;
}

.stats-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 180px;
}

.stats-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.stats-pie-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.stats-pie-legend-label {
  color: var(--text);
  flex: 0 0 auto;
}

.stats-pie-legend-value {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: auto;
}

.cassa-totals {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.cassa-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 1rem;
}

.cassa-totals-row:first-child {
  padding-top: 0;
}

.cassa-totals-row:last-child {
  padding-bottom: 0;
}

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

.cassa-totals-value {
  font-weight: 600;
  color: var(--text);
}

.cassa-history-modal-box {
  max-width: min(560px, 95vw);
}

.cassa-history-content {
  margin-top: 1rem;
}

.cassa-history-empty {
  color: var(--text-muted);
  margin: 0;
}

.cassa-history-list {
  max-height: 60vh;
  overflow-y: auto;
}

.cassa-history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.cassa-history-row:last-child {
  border-bottom: none;
}

.cassa-history-date {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-width: 7rem;
}

.cassa-history-label {
  flex: 1;
  min-width: 0;
}

.cassa-history-amount {
  flex-shrink: 0;
  font-weight: 600;
}

.cassa-history-row-withdrawal .cassa-history-amount {
  color: #ef4444;
}

.cassa-history-reason {
  width: 100%;
  margin-top: 0.25rem;
  padding-left: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cassa-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cassa-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cassa-header-row .cassa-title {
  margin: 0;
}

.cassa-btn-subscription {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: -3px;
}

.cassa-btn-subscription .cassa-subscription-icon {
  display: block;
}

.cassa-withdrawal-btn {
  flex: 1;
}

.subscription-info {
  margin: 0.5rem 0 1rem 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

.subscription-info .subscription-loading,
.subscription-info .subscription-error {
  color: var(--text-muted);
}

.subscription-info .subscription-active {
  color: var(--text);
}

.subscription-info .subscription-expired {
  color: #f85149;
}

.subscription-actions {
  margin-top: 1rem;
}

.shift-report-modal-box {
  max-width: min(560px, 95vw);
}

.shift-report-content {
  margin: 0.5rem 0 1rem 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.shift-report-meta {
  margin: 0.35rem 0;
}

.shift-report-income {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.shift-report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.shift-report-table th,
.shift-report-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shift-report-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.shift-report-time {
  white-space: nowrap;
}

.shift-report-details {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.shift-report-empty {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.shift-report-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.shift-report-confirm-text {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  color: var(--text);
}

.closed-shifts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.closed-shift-item {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.closed-shift-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.closed-shift-employee {
  font-weight: 600;
  margin-right: 0.5rem;
}

.closed-shift-range {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.closed-shift-duration {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.closed-shift-income {
  font-weight: 600;
  margin-left: 0.5rem;
  color: var(--text);
}

.cassa-history-btn {
  flex: 1;
}

#cassa-withdrawal-modal .form-row {
  margin-bottom: 1rem;
}

#cassa-withdrawal-modal .form-row label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

#cassa-withdrawal-modal #cassa-withdrawal-amount {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

#cassa-withdrawal-modal #cassa-withdrawal-amount:focus {
  outline: none;
  border-color: var(--accent);
}

#cassa-withdrawal-modal #cassa-withdrawal-amount::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

#cassa-withdrawal-modal #cassa-withdrawal-reason {
  width: 100%;
  min-height: 88px;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: inherit;
}

#cassa-withdrawal-modal #cassa-withdrawal-reason::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

#cassa-withdrawal-modal #cassa-withdrawal-reason:focus {
  outline: none;
  border-color: var(--accent);
}

.cassa-withdrawal-hint {
  color: #ef4444;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.cassa-withdrawal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: flex-end;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.card-payment-summary {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.orders-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.orders-filters input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}

.filter-status-dropdown {
  position: relative;
  padding-right: 0.5rem;
}

.btn-filter-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-filter-status .filter-icon {
  display: block;
}

.btn-filter-status:hover {
  background: var(--accent-hover);
}

.filter-status-panel {
  position: fixed;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 140px;
  max-width: min(280px, calc(100vw - 2rem));
  max-height: min(70vh, 400px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.filter-status-dropdown.is-open .filter-status-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.filter-status-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.filter-status-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.orders-list-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 14rem);
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 200px;
}
.orders-list {
  list-style: none;
  min-width: 0;
  overflow: visible;
}

.order-card {
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
.order-info {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.order-card:hover {
  border-color: var(--accent);
}

.order-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  align-self: stretch;
  min-width: 0;
  flex-shrink: 0;
}

.order-number {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.order-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.order-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-info .product {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-meta-label {
  color: rgba(255, 255, 255, 0.4);
}

.order-phone {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.order-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.order-status-wrap {
  position: relative;
}

.order-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.525rem 0.75rem;
  margin-left: 3px;
  border: none;
  border-radius: 9px;
  font-size: calc(1.2rem + 12px);
  font-weight: 500;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s, opacity 0.2s;
}

.order-status-btn.badge-new { background: rgba(88, 166, 255, 0.5); }
.order-status-btn.badge-new:hover { background: rgba(88, 166, 255, 0.65); }
.order-status-btn.badge-processing { background: rgba(210, 153, 34, 0.5); }
.order-status-btn.badge-processing:hover { background: rgba(210, 153, 34, 0.65); }
.order-status-btn.badge-done { background: rgba(63, 185, 80, 0.5); }
.order-status-btn.badge-done:hover { background: rgba(63, 185, 80, 0.65); }
.order-status-btn.badge-issued { background: rgba(76, 175, 80, 0.5); }
.order-status-btn.badge-issued:hover { background: rgba(76, 175, 80, 0.65); }
.order-status-btn.badge-cancelled { background: rgba(248, 81, 73, 0.5); }
.order-status-btn.badge-cancelled:hover { background: rgba(248, 81, 73, 0.65); }

.order-status-btn-custom:hover {
  filter: brightness(1.15);
}

.order-status-btn-arrow {
  font-size: 0.975rem;
  opacity: 0.9;
}

.order-status-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  padding: 0.3rem 1rem;
  min-width: 140px;
  max-height: min(200px, calc(100vh - 2rem));
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.order-status-wrap:hover .order-status-dropdown,
.order-status-wrap.is-open .order-status-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.order-status-option {
  padding: 0.16rem 0;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--text);
}

.order-status-option:hover {
  color: var(--accent);
}

.order-actions-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.order-actions .btn-handover,
.order-actions .btn-edit,
.order-actions .btn-print {
  background: transparent;
  color: var(--text-muted);
  padding: 0.35rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.order-actions .btn-print:hover {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.15);
}

.order-actions .btn-handover:hover {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.15);
}

.order-actions .btn-edit:hover {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.15);
}

.product-card .btn-to-receipt {
  background: transparent;
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}
.product-card .btn-to-receipt:hover {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.15);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.badge-new { background: rgba(88, 166, 255, 0.2); color: var(--accent); }
.badge-processing { background: rgba(210, 153, 34, 0.2); color: var(--warning); }
.badge-done { background: rgba(63, 185, 80, 0.2); color: var(--success); }
.badge-issued { background: rgba(76, 175, 80, 0.25); color: #66bb6a; }
.badge-cancelled { background: rgba(248, 81, 73, 0.2); color: var(--danger); }

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.total-price {
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.25rem;
}

/* Главная страница */
.home-main {
  padding-top: 0.5rem;
}

.home-hero {
  margin-bottom: 2.5rem;
}

.home-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.home-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.home-card {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.home-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.home-card-placeholder {
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
}

.home-card-placeholder:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.06);
}

.home-card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.home-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.home-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Страница настроек */
.settings-main {
  padding-top: 0.5rem;
}

.settings-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.settings-list {
  list-style: none;
}

.settings-item-admin-only {
  display: none !important;
}

.settings-item {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.settings-item-label {
  font-weight: 600;
  font-size: 1rem;
  display: block;
  margin-bottom: 0.25rem;
}

.settings-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.settings-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.settings-toggle-text {
  user-select: none;
}

.settings-notification-categories-label {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.settings-notification-categories {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.settings-notification-categories .settings-toggle {
  margin-top: 0;
}

.settings-term-reminders-wrap {
  margin-top: 0.5rem;
}
.settings-term-reminders-list {
  list-style: none;
  margin: 0 0 0.5rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.settings-term-reminder-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.settings-term-reminder-value {
  width: 4rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-sizing: border-box;
}
.settings-term-reminder-unit {
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  min-width: 6rem;
}
.settings-term-reminder-remove {
  padding: 0.25rem 0.4rem;
  border: none;
  background: rgba(248, 81, 73, 0.2);
  color: var(--danger);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.settings-term-reminder-remove:hover {
  background: rgba(248, 81, 73, 0.35);
}
.settings-trigger-term-reminders-btn {
  margin-top: 0.5rem;
}

.settings-select-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.settings-select {
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  min-width: 10rem;
}

.settings-input {
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
}

#settings-item-terminal .form-row {
  margin-bottom: 0.75rem;
}

#settings-item-terminal .form-row label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.modal-box-wide {
  max-width: 480px;
}

.import-crm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.import-crm-preset-btn {
  min-width: 8rem;
}

.import-crm-manual-wrap {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.import-mapping-table-wrap {
  max-height: 280px;
  overflow: auto;
  margin: 0.75rem 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
}

.import-mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.import-mapping-table th,
.import-mapping-table td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.import-mapping-table th {
  font-weight: 600;
  color: var(--text-muted);
}

.import-mapping-select {
  min-width: 12rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text);
}

.import-manual-file-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
}

#form-editor-modal .modal-box {
  max-width: min(520px, 92vw);
  width: 100%;
  box-sizing: border-box;
}

.receipt-editor-modal {
  max-width: 900px;
}

.receipt-editor-modal.modal-box-wide {
  max-width: 95vw;
}

.receipt-editor-layout {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.receipt-editor-panel {
  flex: 1;
  min-width: 280px;
}

.receipt-editor-panel .form-row {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0.5rem 0.75rem;
  align-items: start;
  margin-bottom: 0.75rem;
}

.receipt-editor-panel .form-row:last-child {
  margin-bottom: 0;
}

.receipt-editor-panel .form-row > * {
  grid-column: 2;
  min-width: 0;
}

.receipt-editor-panel .form-row > label:first-of-type:not(.settings-toggle) {
  grid-column: 1;
  padding-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.receipt-editor-panel .form-row input[type="text"],
.receipt-editor-panel .form-row textarea,
.receipt-editor-panel .form-row select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.receipt-editor-panel .receipt-editor-section input[type="text"],
.receipt-editor-panel .receipt-editor-section textarea {
  margin-top: 0.25rem;
}

.receipt-editor-panel .receipt-editor-section textarea {
  resize: vertical;
  min-height: 60px;
}

.receipt-editor-add-actions {
  justify-content: flex-start;
}

.receipt-editor-add-actions #btn-receipt-add-field {
  width: 15%;
  min-width: 0;
  flex: 0 0 auto;
}

.receipt-editor-done-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0.5rem;
}

.receipt-editor-done-wrap #btn-receipt-editor-done {
  width: auto;
  min-width: 0;
}

.receipt-preview-panel {
  flex: 0 0 936px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.receipt-preview-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.receipt-preview-wrap {
  flex: 1;
  min-height: 320px;
  padding: 0.5rem;
  border: 1px solid var(--surface-hover);
  border-radius: 8px;
  background: #f0f0f0;
  overflow: auto;
  max-height: 70vh;
}

.receipt.receipt-preview {
  background: #fff;
  color: #000;
  padding: 10px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-editor-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

#logs-modal .modal-box {
  max-width: min(640px, 92vw);
  width: 100%;
  box-sizing: border-box;
}
.logs-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}
.logs-toolbar {
  margin-bottom: 0.75rem;
}
.logs-list-wrap {
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.logs-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}
.logs-list-item {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}
.logs-list-item:last-child {
  border-bottom: none;
}
.logs-list-time {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.logs-list-action {
  font-weight: 500;
  color: var(--text-primary);
}
.logs-list-details {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0;
}
.logs-list-empty {
  padding: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.settings-employees-list-label {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.employees-list {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: var(--bg);
  min-height: 44px;
}
.employees-list-empty {
  padding: 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.employees-list-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.employees-list-item:last-child {
  border-bottom: none;
}
.employees-list-name {
  font-weight: 500;
  min-width: 8rem;
}
.employees-list-login {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.employees-list-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: auto;
}
.employees-list-edit,
.employees-list-delete {
  padding: 0.25rem 0.5rem;
  min-width: 2rem;
}
.employee-form-notice {
  margin: 0 0 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.employee-form .form-row {
  margin-bottom: 1rem;
}
.employee-form .form-row-checkbox {
  margin-bottom: 1rem;
}
.employee-form .form-row-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0;
}
.employee-form .form-row-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--surface-hover);
  border-radius: 4px;
  background: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.employee-form .form-row-checkbox input[type="checkbox"]:hover {
  border-color: var(--accent);
}
.employee-form .form-row-checkbox input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 0.85rem;
  background-position: center;
  background-repeat: no-repeat;
}
.employee-form .form-row-checkbox input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.35);
}
.employee-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.employee-form input,
.employee-form select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.employee-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.employee-login-modal-desc {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.employee-login-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.templates-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.templates-editor-search {
  flex: 1;
  min-width: 12rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
}
.templates-editor-search::placeholder {
  color: var(--text-muted);
}
.templates-editor-field-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.templates-editor-field-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.templates-editor-field-select {
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  min-width: 10rem;
}
.templates-editor-list {
  margin-bottom: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}
.templates-editor-section {
  margin-bottom: 1.25rem;
}
.templates-editor-section:last-child {
  margin-bottom: 0;
}
.templates-editor-field-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
}
.templates-editor-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.templates-editor-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.templates-editor-item:last-child {
  border-bottom: none;
}
.templates-editor-item-text {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.templates-editor-item .btn-remove-template {
  flex-shrink: 0;
}

.form-editor-fields-list {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
}

/* Редактор полей формы заказа — сетка по линейке, перетаскивание */
#form-editor-fields-list .form-editor-field-item,
#handover-form-editor-fields-list .form-editor-field-item,
.form-editor-actions-grid {
  display: grid;
  grid-template-columns: 2rem minmax(10rem, 1fr) 5.5rem 8.5rem;
  gap: 0.5rem;
  align-items: center;
}
#handover-form-editor-fields-list .form-editor-field-item .field-label-input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#form-editor-fields-list .form-editor-field-item .field-label-input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#form-editor-fields-list .form-editor-field-item .field-type-badge {
  min-width: 0;
  box-sizing: border-box;
}
.form-editor-actions-grid .form-editor-actions-label {
  grid-column: 2;
}
.form-editor-actions-grid select {
  grid-column: 3;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.form-editor-actions-grid .btn {
  grid-column: 4;
  width: 100%;
  box-sizing: border-box;
}

.form-editor-custom-row {
  grid-template-columns: 2rem minmax(8rem, 1fr) minmax(10rem, 1.5fr) 5.5rem 8.5rem;
}
.form-editor-custom-row .form-editor-actions-label {
  grid-column: 2;
}
.form-editor-custom-row .form-editor-custom-label {
  grid-column: 3;
  width: 100%;
  max-width: 100%;
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  box-sizing: border-box;
}
.form-editor-custom-row select {
  grid-column: 4;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.form-editor-custom-row .btn {
  grid-column: 5;
  width: 100%;
  box-sizing: border-box;
}

.form-editor-field-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.form-editor-field-item:last-child {
  border-bottom: none;
}

.form-editor-field-item .field-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  padding: 0.25rem 0.35rem;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  display: inline-block;
  min-width: 1.5rem;
  min-height: 1.5rem;
}
.form-editor-field-item .field-drag-handle:active {
  cursor: grabbing;
}
.form-editor-field-item.dragging {
  opacity: 0.5;
}
.form-editor-field-item.drag-over {
  border-bottom: 2px solid var(--accent);
}

#product-receipt-fields-list .form-editor-field-item .form-editor-field-input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: var(--radius);
  color: var(--text);
}
.product-receipt-fields-list .product-receipt-extra-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.product-receipt-fields-list .product-receipt-extra-item:last-child {
  border-bottom: none;
}
.product-receipt-fields-list .product-receipt-extra-item .form-editor-field-input {
  width: 100%;
  box-sizing: border-box;
}
.product-receipt-fields-list .product-receipt-extra-item .product-receipt-extra-value {
  width: 100%;
  min-height: 4rem;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: var(--radius);
  color: var(--text);
  resize: vertical;
  box-sizing: border-box;
}
.product-receipt-fields-list .product-receipt-extra-item .btn-remove-field {
  align-self: flex-end;
}
.form-editor-field-item .field-label-input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}

.field-type-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-muted);
}

.btn-icon {
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  font-size: 1.1rem;
  line-height: 1;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.form-editor-cell-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
#form-editor-fields-list .form-editor-save-btn {
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
}
#form-editor-fields-list .form-editor-save-btn:hover {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.15);
}
#form-editor-fields-list .form-editor-save-btn.is-active {
  color: var(--success);
  background: rgba(63, 185, 80, 0.2);
}
#form-editor-fields-list .form-editor-save-btn.is-active:hover {
  color: #4dce68;
  background: rgba(63, 185, 80, 0.3);
}

.form-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.form-editor-actions-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.form-editor-actions-grid select {
  grid-column: 3;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.form-editor-actions-grid .btn {
  grid-column: 4;
  width: 100%;
  box-sizing: border-box;
}

.form-editor-actions select,
.form-editor-actions input[type="text"] {
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}

.status-value-input {
  width: 100px;
}

#status-editor-list .form-editor-field-item {
  display: grid;
  grid-template-columns: 2rem 1fr 1fr 2.5rem 2rem;
  gap: 0.5rem;
  align-items: center;
}

#status-editor-list .form-editor-field-item .status-value-input,
#status-editor-list .form-editor-field-item .field-label-input {
  min-width: 0;
  box-sizing: border-box;
}

#status-editor-list .form-editor-field-item .status-color-input {
  width: 2rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  justify-self: start;
}


/* Страница входа */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-wrapper {
  width: 100%;
  max-width: 360px;
}

.login-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 2rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-form .form-row {
  margin-bottom: 1rem;
}

.login-form .form-row-checkbox {
  margin-bottom: 0.75rem;
}

.login-form .form-row-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0;
}

.login-form .form-row-checkbox input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.login-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.login-form input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--surface-hover);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-form .btn-primary {
  margin-top: 1rem;
  margin-bottom: 0;
}

.btn-block {
  width: 100%;
}

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  min-height: 1.25rem;
}

.login-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.login-register-link {
  margin-top: 1rem;
  text-align: center;
}

.login-link-sep {
  margin: 0 0.35rem;
  color: var(--text-muted);
  font-weight: normal;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

.btn-link:hover {
  color: var(--primary-hover, #0056b3);
}

/* Выбор роли после входа */
.role-select-wrapper {
  width: 100%;
  max-width: 720px;
  padding: 1rem;
}
.role-select-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
}
.role-select-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 2rem;
}
.role-select-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 560px) {
  .role-select-cards {
    grid-template-columns: 1fr;
  }
}
.role-select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.role-select-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
}
.role-select-card-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.role-select-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.role-select-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.role-select-card-admin:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}
.role-select-card-admin .role-select-card-icon {
  color: #6366f1;
}
.role-select-card-employee:hover {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}
.role-select-card-employee .role-select-card-icon {
  color: #22c55e;
}
.role-select-logout-wrap {
  margin-top: 1.5rem;
  text-align: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link-active {
  color: var(--accent);
  font-weight: 500;
}

.header-right .user-name {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--surface-hover);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.btn-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Печать квитанции — формат A4, стиль сервисного центра */
.receipt-print-wrap {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  z-index: 99999;
  padding: 1rem;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.receipt-print-wrap.receipt-visible {
  display: flex;
}

.receipt-page {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  padding: 12mm 15mm;
  box-sizing: border-box;
}

.receipt {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  font-size: 12px;
  color: #000;
  line-height: 1.4;
}

.receipt-company {
  text-align: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #333;
}

.receipt-company-name {
  font-weight: bold;
  font-size: 1.15em;
  margin-bottom: 0.25rem;
}

.receipt-company-address,
.receipt-company-phone {
  font-size: 0.95em;
  color: #333;
}

.receipt-header {
  text-align: center;
  font-weight: bold;
  font-size: 1.35em;
  margin-bottom: 1rem;
}

.receipt-order-number {
  text-align: center;
  font-weight: bold;
  margin-bottom: 1rem;
  font-size: 1.05em;
}

.receipt-body {
  margin-bottom: 1rem;
}

.receipt-section-title {
  font-weight: bold;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.95em;
}

.receipt-row {
  margin-bottom: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.receipt-label {
  font-weight: 600;
  width: 11em;
  min-width: 11em;
  flex-shrink: 0;
}

.receipt-row-workdone .receipt-work-done-wrap {
  flex: 1;
  min-width: 0;
}
.receipt-work-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.receipt-work-line:last-child {
  margin-bottom: 0;
}
.receipt-work-name {
  flex: 1;
  min-width: 0;
}
.receipt-work-price {
  flex-shrink: 0;
}
.receipt-handover .receipt-row-total .receipt-total-value {
  margin-left: auto;
}

/* Товарный чек */
.receipt-product-body {
  margin-top: 0.5rem;
}
.receipt-product-head,
.receipt-product-row {
  display: flex;
  gap: 0.5rem 1rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}
.receipt-product-head {
  font-weight: 600;
  border-bottom-width: 2px;
}
.receipt-product-name {
  flex: 1;
  min-width: 0;
}
.receipt-product-qty {
  width: 3em;
  flex-shrink: 0;
  text-align: right;
}
.receipt-product-price {
  width: 5em;
  flex-shrink: 0;
  text-align: right;
}
.receipt-product-sum {
  width: 5em;
  flex-shrink: 0;
  text-align: right;
}
.receipt-product-total {
  margin-top: 0.75rem;
  font-weight: 600;
  text-align: right;
}

.receipt-block {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #666;
  font-size: 0.9em;
}

.receipt-block-title {
  font-weight: bold;
  margin-bottom: 0.35rem;
}

.receipt-footer {
  text-align: center;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.9em;
}

.receipt-signature-line {
  margin-top: 2rem;
  padding-top: 1.5rem;
  font-size: 0.95em;
  border-bottom: 1px solid #000;
  padding-bottom: 0.25rem;
  max-width: 18em;
}

/* Размеры шрифта квитанции (задаются классом на .receipt) */
.receipt.receipt-fs-10 { font-size: 10px; }
.receipt.receipt-fs-11 { font-size: 11px; }
.receipt.receipt-fs-12 { font-size: 12px; }
.receipt.receipt-fs-13 { font-size: 13px; }
.receipt.receipt-fs-14 { font-size: 14px; }

/* Уведомления слева, ближе к основному окну */
.notifications-container {
  position: fixed;
  left: 2rem;
  bottom: 1rem;
  top: 5rem;
  width: 300px;
  max-width: calc(100vw - 4rem);
  max-height: none;
  height: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1100;
  pointer-events: none;
}

.notifications-cards-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
}
@media (min-width: 1640px) {
  .notifications-container {
    left: calc(50vw - 500px - 300px - 1rem);
  }
}
.notifications-container .notification-card {
  pointer-events: auto;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
  opacity: 1;
  transform: translateY(0);
  animation: notification-slide-in-up 0.3s ease-out forwards;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.notifications-container .notification-card .notification-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}
.notifications-container .notification-card .notification-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
  min-width: 0;
}
.notifications-container .notification-card .notification-actions .btn {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  padding: 0.5rem 0.5rem;
  line-height: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notifications-container .notification-card .notification-btn-icon {
  display: block;
  margin: 0 auto;
}
.notifications-container .notification-card .notification-btn-read {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 6px;
}
.notifications-container .notification-card .notification-btn-read:hover {
  background: #16a34a;
}
.notifications-container .notification-card .notification-btn-later {
  background: #eab308;
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
}
.notifications-container .notification-card .notification-btn-later:hover {
  background: #ca8a04;
}
.notifications-container .notification-card.notification-success {
  border-left: 4px solid #22c55e;
}
.notifications-container .notification-card.notification-error {
  border-left: 4px solid #ef4444;
}
.notifications-container .notification-card.notification-info {
  border-left: 4px solid #3b82f6;
}
@keyframes notification-slide-in-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.notifications-container .notification-card.notification-hiding {
  animation: notification-slide-out-down 0.25s ease-in forwards;
}
@keyframes notification-slide-out-down {
  to {
    opacity: 0;
    transform: translateY(100%);
  }
}

/* Печать инвентаризации */
.inventory-print-wrap {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  z-index: 99999;
  padding: 1rem;
  overflow: auto;
  box-sizing: border-box;
}
.inventory-print-wrap.inventory-print-visible {
  display: block;
}
.inventory-print-page {
  max-width: 210mm;
  margin: 0 auto;
  background: #fff;
  padding: 12mm 15mm;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 12px;
  color: #000;
}
.inventory-print-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  text-align: center;
}
.inventory-print-date {
  margin: 0 0 1rem 0;
  text-align: center;
  color: #333;
}
.inventory-print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.inventory-print-table th,
.inventory-print-table td {
  border: 1px solid #333;
  padding: 0.4rem 0.6rem;
  text-align: left;
}
.inventory-print-table th {
  background: #eee;
  font-weight: bold;
}
.inventory-print-table .inventory-print-num {
  width: 2.5rem;
  text-align: center;
}
.inventory-print-table .inventory-print-qty {
  width: 5rem;
  text-align: center;
}
.inventory-print-table .inventory-print-fact {
  width: 6rem;
  min-width: 6rem;
  background: #fff;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }
  .notifications-container {
    display: none !important;
  }
  body * {
    visibility: hidden;
  }
  .receipt-print-wrap.receipt-visible,
  .receipt-print-wrap.receipt-visible * {
    visibility: visible;
  }
  .receipt-print-wrap.receipt-visible {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    min-height: 100%;
    padding: 0;
    margin: 0;
    background: #fff;
    display: block !important;
    box-shadow: none;
  }
  .receipt-print-wrap:not(.receipt-visible) {
    display: none !important;
  }
  .receipt-page {
    width: 100%;
    min-height: auto;
    max-width: none;
    box-shadow: none;
    padding: 12mm;
    box-sizing: border-box;
  }
  .inventory-print-wrap.inventory-print-visible,
  .inventory-print-wrap.inventory-print-visible * {
    visibility: visible;
  }
  .inventory-print-wrap.inventory-print-visible {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    min-height: 100%;
    padding: 0;
    margin: 0;
    background: #fff;
    display: block !important;
  }
  .inventory-print-page {
    box-shadow: none;
    max-width: none;
  }
}
