@font-face {
  font-family: "Rabar";
  src: url("../afonts/Rabar_0021.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f7;
  --bg-grad: #d8e0f5;
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.88);
  --border: #d0d7e6;
  --text: #0f1623;
  --muted: #5b6679;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --nav-hover: rgba(15, 22, 35, 0.06);
  --table-head: #e6eaf4;
  --input-bg: #ffffff;
  --shadow: rgba(15, 22, 35, 0.08);
  --modal-backdrop: rgba(15, 23, 42, 0.45);
  --danger-border: rgba(220, 38, 38, 0.35);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --danger-text: #991b1b;
  --ok-border: rgba(22, 163, 74, 0.35);
  --ok-bg: rgba(22, 163, 74, 0.1);
  --ok-text: #166534;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1117;
  --bg-grad: #152238;
  --panel: #141b24;
  --panel-glass: rgba(20, 27, 36, 0.72);
  --border: #243044;
  --text: #e8eef7;
  --muted: #8b9bb5;
  --accent: #3d8bfd;
  --accent-text: #041022;
  --accent-soft: rgba(61, 139, 253, 0.12);
  --nav-hover: rgba(255, 255, 255, 0.04);
  --table-head: rgba(0, 0, 0, 0.2);
  --input-bg: rgba(12, 17, 23, 0.65);
  --shadow: rgba(0, 0, 0, 0.45);
  --modal-backdrop: rgba(0, 0, 0, 0.55);
  --danger-border: rgba(255, 80, 80, 0.45);
  --danger-bg: rgba(255, 80, 80, 0.08);
  --danger-text: #ffb4b4;
  --ok-border: rgba(46, 204, 113, 0.35);
  --ok-bg: rgba(46, 204, 113, 0.1);
  --ok-text: #c8f7d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Rabar", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, var(--bg-grad) 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
}

button,
input,
select,
textarea,
optgroup,
.btn {
  font-family: inherit;
}

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

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-inline-end: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
  padding: 1.25rem 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.brand strong {
  font-size: 1.05rem;
}

.brand span {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--muted);
}

.nav a:hover {
  background: var(--nav-hover);
  color: var(--text);
}

.nav a.active {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid rgba(61, 139, 253, 0.35);
}

.nav a.nav-secondary {
  margin-inline-start: 0.5rem;
  padding-block: 0.45rem;
  font-size: 0.9rem;
  border-inline-start: 3px solid rgba(61, 139, 253, 0.5);
  border-radius: 0 10px 10px 0;
}

.main {
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.card {
  background: var(--panel-glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px var(--shadow);
}

.muted {
  color: var(--muted);
  margin: 0;
}

.btn {
  border: 1px solid var(--border);
  background: var(--nav-hover);
  color: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}

.btn:hover {
  border-color: rgba(61, 139, 253, 0.45);
}

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 14px;
}

.btn-theme svg {
  width: 26px;
  height: 26px;
}

.theme-switch {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(420px, 100%);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="search"],
input.js-fmt-num {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="date"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  min-height: 2.75rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
  padding: 0.2rem 0.35rem;
  margin-inline-start: 0.25rem;
  border-radius: 8px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: var(--nav-hover);
}

html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.88);
  opacity: 0.75;
}

html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  filter: invert(0.88);
}

textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  min-height: 5.5rem;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b6679' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 2.65rem 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--input-bg);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-size: 1.1rem;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  min-height: 2.75rem;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="dark"] select {
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

html[dir="rtl"] select {
  background-position: 0.75rem 50%;
  padding: 0.65rem 0.85rem 0.65rem 2.65rem;
}

html[dir="ltr"] select {
  background-position: calc(100% - 0.75rem) 50%;
  padding: 0.65rem 2.65rem 0.65rem 0.85rem;
}

select:hover,
input[type="date"]:hover,
input[type="text"]:hover,
input[type="password"]:hover,
input[type="tel"]:hover,
input[type="search"]:hover,
input.js-fmt-num:hover,
textarea:hover {
  border-color: rgba(61, 139, 253, 0.28);
}

input:focus,
select:focus,
textarea:focus,
input[type="date"]:focus {
  outline: none;
  border-color: rgba(61, 139, 253, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.flash {
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.flash-ok {
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--ok-border);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.btn-sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.85rem;
}

.btn-danger {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-icon-plus {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 600;
  padding: 0;
  border: 1px solid rgba(61, 139, 253, 0.45);
  background: var(--accent-soft);
  color: var(--text);
  cursor: pointer;
}

.btn-icon-plus:hover {
  border-color: rgba(61, 139, 253, 0.75);
}

.btn-icon-plus--customer {
  border-color: rgba(61, 139, 253, 0.55);
  background: rgba(61, 139, 253, 0.16);
}

.btn-icon-plus--customer:hover {
  border-color: rgba(61, 139, 253, 0.9);
}

.btn-icon-plus--driver {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.16);
}

.btn-icon-plus--driver:hover {
  border-color: rgba(16, 185, 129, 0.9);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 1.5rem;
  background: var(--panel);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th,
table.data td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: middle;
}

table.data th {
  color: var(--muted);
  font-weight: 600;
  background: var(--table-head);
}

table.data tr:last-child td {
  border-bottom: none;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* ئایکۆنی پێناسەی قەبارە: لە flexدا نابچووکێتەوە (نەماوەی کلیک) */
.row-actions .btn-size-bom,
.row-actions .btn-wh-type[aria-label="پێناسەی مادەکان"] {
  flex-shrink: 0;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

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

.modal.modal--nested {
  z-index: 10050;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 24px 80px var(--shadow);
}

.modal-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

/* مۆداڵی موادی پێویستی قاڵب — ڕێک و پوخت */
.modal-panel.modal-mold-req {
  width: min(920px, 100%);
  max-height: min(90vh, 840px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-mold-req__head {
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-mold-req__title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.modal-mold-req__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.modal-mold-req__badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(61, 139, 253, 0.22);
  font-size: 0.8rem;
  line-height: 1.3;
}

.modal-mold-req__badge--def {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.28);
}

html[data-theme="dark"] .modal-mold-req__badge--def {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.22);
}

.modal-mold-req__k {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.76rem;
}

.modal-mold-req__v {
  font-weight: 600;
  color: var(--text);
}

.modal-mold-req__body {
  padding: 1rem 1.25rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.modal-mold-req__field {
  margin-bottom: 0.9rem;
}

.modal-mold-req__field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.modal-mold-req__input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.modal-mold-req__input:hover {
  border-color: rgba(61, 139, 253, 0.28);
}

.modal-mold-req__input:focus {
  outline: none;
  border-color: rgba(61, 139, 253, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal-mold-req__toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.modal-mold-req__hint {
  flex: 1;
  min-width: 10rem;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0;
}

.btn-mold-req-add {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-weight: 600;
  border-color: rgba(61, 139, 253, 0.45);
  background: var(--accent-soft);
}

.btn-mold-req-add:hover {
  border-color: rgba(61, 139, 253, 0.75);
}

.btn-mold-req-add__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 6px;
  background: rgba(61, 139, 253, 0.2);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}

.mold-req-table-wrap {
  margin-bottom: 0;
  border-radius: 12px;
}

table.mold-req-table {
  font-size: 0.88rem;
}

table.mold-req-table th,
table.mold-req-table td {
  padding: 0.45rem 0.55rem;
  vertical-align: middle;
}

table.mold-req-table th {
  font-size: 0.74rem;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

table.mold-req-table .mold-req-col-del {
  width: 4.5rem;
  text-align: center;
}

table.mold-req-table .mold-req-col-name {
  min-width: 7.5rem;
  width: 26%;
}

table.mold-req-table .mold-req-col-type {
  min-width: 7rem;
  width: 26%;
}

table.mold-req-table .mold-req-col-consume {
  min-width: 11rem;
  width: 40%;
}

.mold-req-select,
.mold-req-input {
  width: 100%;
  max-width: 100%;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}

.mold-req-select:hover,
.mold-req-input:hover {
  border-color: rgba(61, 139, 253, 0.28);
}

.mold-req-select:focus,
.mold-req-input:focus {
  outline: none;
  border-color: rgba(61, 139, 253, 0.55);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.mold-req-select--unit {
  min-width: 4.6rem;
}

.mold-req-consume-cell {
  display: grid;
  grid-template-columns: minmax(3.25rem, 1fr) minmax(4.4rem, 5.2rem);
  gap: 0.4rem;
  align-items: center;
}

.mold-req-td-del {
  text-align: center;
}

.mold-req-del {
  padding: 0.28rem 0.42rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.modal-mold-req__foot {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 160%);
  flex-shrink: 0;
}

html[data-theme="dark"] .modal-mold-req__foot {
  background: linear-gradient(180deg, var(--panel) 0%, rgba(0, 0, 0, 0.15) 120%);
}

.modal-mold-req__actions.form-actions {
  margin-top: 0;
}

/* کاڵاکانی کۆگا — یەکەی هاتوو */
.warehouse-incoming-th {
  max-width: 8.5rem;
  font-size: 0.82rem;
  line-height: 1.25;
  font-weight: 600;
}

.warehouse-incoming-cell {
  width: 9.5rem;
  vertical-align: middle;
}

.warehouse-incoming-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  padding: 0.32rem 0.5rem;
  border-color: rgba(61, 139, 253, 0.35);
  background: var(--accent-soft);
}

.warehouse-incoming-trigger:hover {
  border-color: rgba(61, 139, 253, 0.65);
}

.warehouse-incoming-trigger__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 6px;
  background: rgba(61, 139, 253, 0.18);
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
}

.modal-panel.modal-warehouse-incoming {
  width: min(440px, 100%);
}

.warehouse-incoming-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (min-width: 400px) {
  .warehouse-incoming-choices {
    grid-template-columns: repeat(3, 1fr);
  }
}

.warehouse-incoming-choice {
  padding: 0.55rem 0.65rem;
  font-weight: 600;
}

.warehouse-incoming-choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.warehouse-incoming-choice--muted {
  grid-column: 1 / -1;
  font-weight: 500;
  opacity: 0.92;
}

/* نرخی دۆلار — بازاری بۆرسە */
.usd-borsa-section {
  max-width: 920px;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem 1.05rem;
}

.usd-borsa-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.usd-borsa-section__status {
  font-size: 0.78rem;
  white-space: nowrap;
  direction: ltr;
}

.usd-borsa-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.usd-borsa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  padding: 0.9rem 0.65rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--panel) 0%, var(--bg) 100%);
  box-shadow: 0 4px 16px var(--shadow);
}

.usd-borsa-card__city {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.usd-borsa-card__amount {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  direction: ltr;
}

.usd-borsa-card__unit {
  font-size: 0.78rem;
}

.usd-borsa-card__time {
  font-size: 0.7rem;
  margin-top: 0.15rem;
  direction: ltr;
}

@media (max-width: 720px) {
  .usd-borsa-cards {
    grid-template-columns: 1fr;
  }
}

/* ڕێکخستنەکان: تۆڕی دوگمە + ئایکۆن → پۆپئەپ */
.settings-hub {
  max-width: 920px;
}

.btn-wh-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  vertical-align: middle;
}
.btn-wh-type:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.btn-wh-type:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.btn-wh-type__svg {
  display: block;
}

.settings-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.settings-tiles--stack {
  grid-template-columns: 1fr;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.settings-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 96px;
  padding: 0.65rem 0.45rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
a.settings-tile {
  text-decoration: none;
  box-sizing: border-box;
}
a.settings-tile:visited {
  color: var(--text);
}

button.settings-tile {
  font-family: inherit;
  text-align: center;
  width: 100%;
}
.settings-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px var(--shadow);
}
.settings-tile:active {
  transform: scale(0.98);
}
.settings-tile--danger {
  border-color: var(--danger-border);
  color: var(--danger-text);
}
.settings-tile--danger:hover {
  border-color: #c92a2a;
}
.settings-tile__icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
}
.settings-tile__label {
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.35;
  max-width: 11rem;
}
.settings-tile__label--twoline {
  font-size: 0.72rem;
  line-height: 1.3;
  max-width: 11rem;
}
.settings-tile__label-line {
  display: block;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

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

input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="number"]:hover {
  border-color: rgba(61, 139, 253, 0.28);
}

input[type="number"]:focus {
  outline: none;
  border-color: rgba(61, 139, 253, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.num-cell {
  direction: ltr;
  unicode-bidi: plaintext;
  font-variant-numeric: tabular-nums;
}

.modal-panel.disburse-modal-panel {
  width: min(480px, 100%);
}

.disburse-modal-panel > .stack {
  gap: 1rem;
}

.disburse-modal-panel h2 {
  margin-bottom: 0.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
}

.disburse-modal-panel .form-actions {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.emp-pick {
  position: relative;
}

.emp-pick-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  min-height: 2.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: start;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.emp-pick-trigger:hover {
  border-color: rgba(61, 139, 253, 0.35);
}

.emp-pick-trigger:focus {
  outline: none;
  border-color: rgba(61, 139, 253, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.emp-pick-trigger::after {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-inline-end: 2px solid var(--muted);
  border-block-end: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-block-end: 0.15rem;
  opacity: 0.85;
}

.emp-pick-caption {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 400;
}

.emp-pick-trigger--has .emp-pick-caption {
  color: var(--text);
  font-weight: 600;
}

.emp-pick-pop {
  display: none;
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 8px);
  width: 100%;
  min-width: 0;
  max-height: 280px;
  z-index: 70;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.65rem;
  box-shadow: 0 16px 48px var(--shadow), 0 0 0 1px rgba(61, 139, 253, 0.06);
}

.emp-pick-pop.is-open {
  display: block;
  animation: empPickIn 0.16s ease-out;
}

@keyframes empPickIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.emp-pick-search {
  width: 100%;
  margin: 0 0 0.4rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.emp-pick-search:focus {
  outline: none;
  border-color: rgba(61, 139, 253, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.emp-pick-list {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0;
  max-height: 200px;
  overflow: auto;
  border-radius: 10px;
}

.emp-pick-list li {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.emp-pick-list li:hover,
.emp-pick-list li:focus {
  background: var(--accent-soft);
  outline: none;
}

.emp-pick-list li:active {
  filter: brightness(0.97);
}

.disburse-form-salary,
.disburse-form-loan {
  gap: 0.85rem;
}

#loan-preview {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(61, 139, 253, 0.15);
  color: var(--text);
}

/* پەڕەی کۆگا */
.wh-page {
  max-width: 1200px;
}

.wh-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}

.wh-breadcrumb__sep {
  color: var(--muted);
  opacity: 0.65;
}

.wh-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.wh-page__title {
  margin: 0 !important;
}

.wh-page__sub {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
}

.wh-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* کارتەکانی بەردەست — کۆگا + شەربەت */
.inv-stock-bar,
.wh-stock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.inv-stock-bar__label,
.wh-stock-bar__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.inv-stock-bar__hint,
.wh-stock-bar__hint {
  font-size: 0.78rem;
}

.inv-cards,
.wh-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  align-items: stretch;
}

.inv-card,
.wh-card--compact {
  position: relative;
  background: linear-gradient(165deg, var(--panel) 0%, var(--accent-soft) 140%);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.inv-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
  padding: 0.5rem 0.45rem 0.55rem;
  cursor: pointer;
  text-align: center;
}

.inv-card:hover,
.wh-card--compact:hover {
  border-color: rgba(61, 139, 253, 0.45);
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-2px);
}

.inv-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  padding: 0 0.15rem;
}

.inv-card__title,
.wh-card--compact .wh-card__title {
  margin: 0;
  font-weight: 700;
  font-size: 0.76rem;
  line-height: 1.28;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.inv-card__total,
.wh-card__total {
  margin: 0.35rem 0 0.1rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.inv-card__total-num,
.wh-card__total-num {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.inv-card__total-unit,
.wh-card__total-unit {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.inv-card__meta {
  margin: 0;
  font-size: 0.68rem;
}

.syrup-card--has-damage {
  border-color: rgba(198, 40, 40, 0.35);
}

.syrup-card__damage-btn {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid rgba(198, 40, 40, 0.35);
  border-radius: 8px;
  background: rgba(255, 235, 238, 0.6);
  color: #c62828;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.35rem;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

html[data-theme="dark"] .syrup-card__damage-btn {
  background: rgba(198, 40, 40, 0.15);
}

.syrup-card__damage-btn.is-active,
.syrup-card__damage-btn:hover {
  opacity: 1;
  transform: scale(1.06);
}

.syrup-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.syrup-badge--intake {
  background: rgba(61, 139, 253, 0.12);
  color: var(--text);
}

.syrup-badge--damage {
  background: rgba(198, 40, 40, 0.12);
  color: #c62828;
}

html[data-theme="dark"] .syrup-badge--damage {
  color: #ef9a9a;
}

.syrup-row--damage:hover {
  background: rgba(198, 40, 40, 0.06);
}

.syrup-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
}

.syrup-detail-stats > div {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--accent-soft);
}

.syrup-detail-stats dt {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.syrup-detail-stats dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.syrup-detail-stats__avail {
  grid-column: 1 / -1;
  border-color: rgba(61, 139, 253, 0.35);
  background: rgba(61, 139, 253, 0.08);
}

.syrup-detail-damage {
  color: #c62828;
}

html[data-theme="dark"] .syrup-detail-damage {
  color: #ef9a9a;
}

.wh-card--compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 5.25rem;
  padding: 0.45rem 0.4rem 0.5rem;
  cursor: pointer;
  text-align: center;
}

.wh-card--compact:focus-visible {
  outline: 2px solid rgba(61, 139, 253, 0.55);
  outline-offset: 2px;
}

.wh-card--dragging {
  opacity: 0.75;
  transform: scale(1.02);
  box-shadow: 0 8px 24px var(--shadow);
}

.wh-card--dragging .wh-card__drag {
  cursor: grabbing;
}


.wh-card__count {
  position: absolute;
  top: 0.28rem;
  left: 0.32rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: rgba(61, 139, 253, 0.14);
  color: var(--text);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}

.wh-card__tools {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.wh-card--compact:hover .wh-card__tools,
.wh-card--compact:focus-within .wh-card__tools {
  opacity: 1;
}

.wh-card__tool {
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.wh-card__tool:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.wh-card__drag {
  cursor: grab;
  touch-action: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.wh-card__drag:active {
  cursor: grabbing;
}

.wh-stock-modal-panel {
  width: min(560px, 96vw);
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
}

.wh-stock-modal__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.35;
  word-break: break-word;
}

.wh-stock-modal__unit {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}

.wh-stock-modal-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: 50vh;
  overflow: auto;
  margin-bottom: 0.25rem;
}

.wh-stock-modal-table {
  width: 100%;
  font-size: 0.92rem;
}

.wh-stock-modal-table th,
.wh-stock-modal-table td {
  padding: 0.55rem 0.65rem;
}

.wh-stock-modal__type {
  font-weight: 500;
  max-width: 14rem;
  word-break: break-word;
}

.wh-stock-modal__qty strong {
  font-size: 1.02rem;
}

.wh-stock-modal__actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.wh-filters {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .wh-filters {
  background: rgba(255, 255, 255, 0.03);
}

.wh-section-label {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--accent-soft);
}

.table-pagination__nav {
  display: flex;
  gap: 0.45rem;
}

.table-pagination__info {
  font-size: 0.84rem;
}

.wh-filters__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}

.wh-filters__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8rem;
}

.wh-filters__field span {
  font-size: 0.78rem;
}

.wh-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-inline-start: auto;
}

.wh-input,
.wh-select {
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.wh-table-wrap {
  margin-bottom: 0;
}

/* خشتەی هاتنی کۆگا: هاوتاکردنی پانی ستونەکان (سەرپەڕە + ناوەڕۆک)، بە تایبەتی لە RTL */
table.wh-table {
  table-layout: fixed;
  width: 100%;
}

table.wh-table col.wh-col--date {
  width: 11%;
}
table.wh-table col.wh-col--name {
  width: 15%;
}
table.wh-table col.wh-col--type {
  width: 22%;
}
table.wh-table col.wh-col--qty {
  width: 11%;
}
table.wh-table col.wh-col--unit {
  width: 9%;
}
table.wh-table col.wh-col--driver {
  width: 14%;
}
table.wh-table col.wh-col--actions {
  width: 18%;
}

table.wh-table .wh-td-wrap {
  word-break: break-word;
  overflow-wrap: anywhere;
}

table.wh-table .wh-th-actions,
table.wh-table .wh-td-actions {
  text-align: center;
  white-space: nowrap;
}

.wh-table tbody tr.wh-row-click {
  cursor: pointer;
}

.wh-table tbody tr.wh-row-click:hover {
  background: var(--accent-soft);
}

.wh-entry-panel {
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 0;
}

.wh-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.65rem;
  border-bottom: 1px solid var(--border, #e5e5e5);
}

.wh-entry-head__title {
  margin: 0;
  font-size: 1.15rem;
}

.wh-entry-head__close {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #666);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

.wh-entry-head__close:hover {
  background: var(--surface-alt, rgba(0, 0, 0, 0.06));
  color: var(--text, inherit);
}

.wh-entry-form {
  padding: 0 1.15rem 1rem;
}

.wh-entry-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.wh-entry-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.wh-entry-field__label {
  font-size: 0.8rem;
  color: var(--muted, #666);
}

.wh-entry-field .wh-input,
.wh-entry-field .wh-select {
  width: 100%;
  box-sizing: border-box;
}

.wh-entry-field--grow {
  flex: 1 1 8rem;
}

.wh-entry-field--qty {
  flex: 0 0 5.5rem;
  max-width: 6.5rem;
}

.wh-entry-lines__head {
  margin-bottom: 0.45rem;
}

.wh-entry-lines__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted, #666);
}

.wh-lines-root {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wh-line-block {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 10px;
  background: var(--surface-alt, rgba(0, 0, 0, 0.02));
}

.wh-line-num {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50%;
  background: var(--accent-soft, rgba(59, 130, 246, 0.12));
  color: var(--accent, #2563eb);
  margin-top: 1.55rem;
}

.wh-line-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.wh-line-block--multi .wh-line-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.wh-line-block--multi .wh-entry-field--grow {
  grid-column: 1 / -1;
}

.wh-line-remove {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #888);
  padding: 0.2rem 0.35rem;
  margin-top: 1.4rem;
  border-radius: 6px;
}

.wh-line-remove:hover {
  color: var(--danger, #c62828);
  background: rgba(198, 40, 40, 0.08);
}

.wh-entry-add-line {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem;
  border: 1px dashed var(--border, #ccc);
  border-radius: 10px;
  background: transparent;
  color: var(--accent, #2563eb);
  font-size: 0.9rem;
  cursor: pointer;
}

.wh-entry-add-line:hover {
  background: var(--accent-soft, rgba(59, 130, 246, 0.08));
  border-color: var(--accent, #2563eb);
}

.wh-entry-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border, #e5e5e5);
}

.wh-entry-foot__main {
  display: flex;
  gap: 0.5rem;
  margin-inline-start: auto;
}

.wh-input-full {
  width: 100%;
  box-sizing: border-box;
}

.wh-batch-stack .wh-batch-line + .wh-batch-line {
  margin-top: 0.25rem;
}

.mold-skip-modal-panel {
  width: min(720px, 100%);
  max-height: min(90vh, 800px);
  overflow: auto;
}

.mold-skip-table-wrap {
  margin-bottom: 0;
  border-radius: 12px;
}

table.mold-skip-table {
  font-size: 0.9rem;
}

.mold-skip-input,
.mold-skip-select {
  width: 100%;
  max-width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.mold-skip-num {
  max-width: 7rem;
}

.mold-skip-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* بەرهەم هێنان */
.prod-page {
  max-width: 1000px;
}

.prod-page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.prod-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.prod-filters {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}

.prod-filters__title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.prod-filters__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}

.prod-filters__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8rem;
}

.prod-filters__field--grow {
  flex: 1;
  min-width: 14rem;
}

.prod-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-inline-start: auto;
}

.prod-input,
.prod-select {
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.prod-table-wrap {
  margin-bottom: 0;
}

table.prod-table {
  table-layout: fixed;
  width: 100%;
}

table.prod-table col.prod-col--date {
  width: 14%;
}
table.prod-table col.prod-col--mold {
  width: 20%;
}
table.prod-table col.prod-col--def {
  width: 32%;
}
table.prod-table col.prod-col--sets {
  width: 12%;
}
table.prod-table col.prod-col--actions {
  width: 22%;
}

table.prod-table .prod-th-actions,
table.prod-table .prod-td-actions {
  text-align: center;
  white-space: nowrap;
}

.prod-table tbody tr.prod-row-click {
  cursor: pointer;
}

.prod-table tbody tr.prod-row-click:hover {
  background: var(--accent-soft);
}

.prod-modal-panel {
  width: min(560px, 100%);
}

.prod-lines-panel {
  margin-bottom: 0.25rem;
}

.prod-line {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 2.25rem 0.65rem 0.75rem;
  margin-bottom: 0.65rem;
  background: var(--surface-alt, rgba(0, 0, 0, 0.02));
}

.prod-line__fields {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.prod-line__mini {
  font-size: 0.78rem;
  display: block;
  margin-bottom: 0.1rem;
}

.prod-line-remove {
  position: absolute;
  top: 0.35rem;
  inset-inline-end: 0.35rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 1;
  border-radius: 6px;
  font-size: 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.prod-line-remove:hover {
  background: var(--accent-soft);
}

.prod-add-line-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.prod-line-add-btn {
  flex-shrink: 0;
}

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

  .sidebar {
    border-inline-end: none;
    border-bottom: 1px solid var(--border);
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
