:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #182230;
  --muted: #667085;
  --line: #d7e0ea;
  --primary: #1f4e79;
  --primary-2: #2d6e9f;
  --critical: #c00000;
  --low: #ffc000;
  --incoming: #ffd966;
  --ok: #70ad47;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: var(--primary);
  color: #fff;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: #dce9f5;
}

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

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px;
}

.login-body {
  min-height: 100vh;
  background: #eef4f8;
}

.quote-body {
  min-height: 100vh;
  background: #eef4f8;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  max-width: none;
  place-items: center;
  padding: 24px;
}

.login-card {
  display: grid;
  width: min(430px, 100%);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(31, 78, 121, 0.18);
}

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

.quote-shell {
  display: grid;
  max-width: none;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.quote-card {
  display: grid;
  width: min(920px, 100%);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(31, 78, 121, 0.18);
}

.quote-heading h1 {
  margin: 0;
  color: var(--primary);
  font-size: 25px;
}

.quote-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.login-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
}

.login-heading h1 {
  margin: 0;
  color: var(--primary);
  font-size: 25px;
}

.login-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.login-card .notice {
  margin-bottom: 0;
}

.setup-panel {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.setup-heading h2 {
  margin: 0;
  color: var(--primary);
  font-size: 18px;
}

.setup-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.setup-section-title {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.setup-checkbox {
  grid-column: 1 / -1;
}

.setup-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
}

.setup-actions button {
  min-height: 40px;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 6px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.nav-button.active {
  background: #fff;
  color: var(--primary);
}

.primary {
  background: var(--primary-2);
  color: #fff;
}

.warning {
  background: var(--low);
  color: #3b2a00;
}

.danger {
  background: #b42318;
  color: #fff;
}

.small {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.plus-button {
  min-width: 118px;
}

.ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  min-height: 38px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics article,
.panel,
.notice,
.toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics article {
  padding: 16px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.metrics .critical strong {
  color: var(--critical);
}

.metrics .low strong {
  color: #9a6b00;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 16px;
  color: var(--muted);
}

.toolbar span {
  margin-left: auto;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

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

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

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

.dashboard-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
}

.panel {
  padding: 16px;
  margin-bottom: 16px;
}

.dashboard-panel {
  min-width: 0;
  padding: 10px;
}

.dashboard-panel h2 {
  margin-bottom: 7px;
  font-size: 14px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-header h2 {
  margin: 0;
}

.stock-search-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.stock-search-bar input {
  min-height: 34px;
}

.stock-search-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

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

.definition-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.settings-definition-grid {
  align-items: start;
}

.definition-panel {
  min-width: 0;
  padding: 12px;
}

.definition-panel h2 {
  margin-bottom: 8px;
  font-size: 15px;
}

.term-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

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

.account-panel {
  align-self: start;
}

.definition-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.definition-row-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px auto;
  gap: 6px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
}

.definition-row-form input {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.definition-status {
  justify-self: start;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
}

.definition-status.active {
  background: #edf8ed;
  color: #25612b;
}

.definition-status.passive {
  background: #eef2f6;
  color: #667085;
}

.definition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  grid-column: 1 / -1;
}

.definition-actions .small {
  min-height: 24px;
  padding: 4px 6px;
  font-size: 11px;
}

.payment-term-row {
  grid-template-columns: minmax(0, 1fr) 52px auto;
}

.payment-term-row strong,
.payment-term-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.45;
}

.stock-dialog textarea {
  min-height: 88px;
}

.supplier-dialog textarea {
  min-height: 88px;
}

.movement-dialog {
  width: min(680px, calc(100vw - 28px));
}

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

.field-with-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.icon-add-button {
  min-height: 38px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.wide {
  grid-column: 1 / -1;
}

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

.table-wrap.compact {
  max-height: 520px;
}

.stock-card-table table {
  min-width: 820px;
}

.stock-card-table {
  font-size: 12px;
}

.stock-card-table th,
.stock-card-table td {
  padding: 6px 8px;
}

.stock-card-table th {
  font-size: 11px;
}

.stock-code-cell {
  width: 92px;
  font-weight: 700;
  white-space: nowrap;
}

.stock-name-cell {
  min-width: 260px;
}

.stock-name-cell strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.stock-category-cell {
  width: 150px;
  color: var(--muted);
  font-weight: 700;
}

.stock-detail-cell {
  width: 112px;
}

.stock-detail-button {
  min-width: 72px;
}

.suppliers-table table {
  min-width: 1120px;
}

.procurement-table table {
  min-width: 1240px;
}

.production-recipe-table table {
  min-width: 860px;
}

.production-order-table table {
  min-width: 1240px;
}

.definitions-table table {
  min-width: 720px;
}

.stock-definition-table table {
  min-width: 420px;
}

.dashboard-stock-table table {
  min-width: 0;
}

.dashboard-stock-table,
.dashboard-movements-table {
  font-size: 12px;
  max-height: 260px;
}

.dashboard-stock-table table,
.dashboard-movements-table table {
  table-layout: fixed;
  min-width: 0;
}

.dashboard-stock-table th,
.dashboard-stock-table td,
.dashboard-movements-table th,
.dashboard-movements-table td {
  padding: 5px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-stock-table th,
.dashboard-movements-table th {
  font-size: 11px;
}

.dashboard-stock-table th:nth-child(1),
.dashboard-stock-table td:nth-child(1) {
  width: 74px;
}

.dashboard-stock-table th:nth-child(3),
.dashboard-stock-table td:nth-child(3) {
  width: 86px;
}

.dashboard-stock-table th:nth-child(4),
.dashboard-stock-table td:nth-child(4) {
  width: 96px;
}

.dashboard-stock-table th:nth-child(5),
.dashboard-stock-table td:nth-child(5) {
  width: 158px;
}

.dashboard-movements-table th:nth-child(1),
.dashboard-movements-table td:nth-child(1) {
  width: 86px;
}

.dashboard-movements-table th:nth-child(3),
.dashboard-movements-table td:nth-child(3),
.dashboard-movements-table th:nth-child(4),
.dashboard-movements-table td:nth-child(4),
.dashboard-movements-table th:nth-child(5),
.dashboard-movements-table td:nth-child(5) {
  width: 58px;
}

.dashboard-stock-table .status-cell {
  min-width: 0;
  gap: 4px;
  flex-wrap: nowrap;
}

.dashboard-stock-table .status,
.dashboard-movements-table .status {
  min-width: 58px;
  padding: 3px 5px;
  font-size: 10px;
}

.dashboard-stock-table .request-button {
  min-height: 22px;
  padding: 3px 6px;
  font-size: 10px;
}

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

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}

tbody tr:nth-child(odd) {
  background: #e9f6fb;
}

.stock-card-table tbody tr.critical-stock-row td,
.dashboard-stock-table tbody tr.critical-stock-row td {
  background: #fff1f1;
}

.stock-card-table tbody tr.critical-stock-row td:first-child,
.dashboard-stock-table tbody tr.critical-stock-row td:first-child {
  animation: criticalStockBlink 1.8s ease-in-out infinite;
  box-shadow: inset 5px 0 0 var(--critical);
  will-change: background-color;
}

.stock-card-table tbody tr.critical-stock-row .status.kritik,
.dashboard-stock-table tbody tr.critical-stock-row .status.kritik {
  animation: criticalStatusBlink 1.8s ease-in-out infinite;
  will-change: background-color;
}

.stock-card-table tbody tr.critical-stock-row small,
.dashboard-stock-table tbody tr.critical-stock-row small {
  color: #7a271a;
}

.stock-card-table tbody tr.incoming-stock-row td,
.dashboard-stock-table tbody tr.incoming-stock-row td,
.procurement-table tbody tr.procurement-incoming-row td {
  background: #fff4c6;
}

.stock-card-table tbody tr.incoming-stock-row td:first-child,
.dashboard-stock-table tbody tr.incoming-stock-row td:first-child,
.procurement-table tbody tr.procurement-incoming-row td:first-child {
  box-shadow: inset 5px 0 0 #d98d00;
}

.stock-card-table tbody tr.incoming-stock-row small,
.dashboard-stock-table tbody tr.incoming-stock-row small,
.procurement-table tbody tr.procurement-incoming-row small {
  color: #7a4b00;
}

@keyframes criticalStockBlink {
  0%,
  100% {
    background-color: #fff1f1;
  }

  50% {
    background-color: #ffb8b8;
  }
}

@keyframes criticalStatusBlink {
  0%,
  100% {
    background-color: var(--critical);
  }

  50% {
    background-color: #ff2f2f;
  }
}

.status {
  display: inline-block;
  min-width: 70px;
  border-radius: 4px;
  padding: 4px 7px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.status.kritik {
  background: var(--critical);
}

.status.dusuk {
  background: var(--low);
  color: #3b2a00;
}

.status.yeterli {
  background: var(--ok);
}

.status.incoming {
  background: var(--incoming);
  color: #3b2a00;
}

.status.purchase-sent {
  background: var(--primary-2);
}

.status.purchase-opened {
  background: #7a5af8;
}

.status.purchase-responded {
  background: var(--ok);
}

.status.purchase-ordered {
  background: var(--incoming);
  color: #3b2a00;
}

.status.purchase-mail_failed {
  background: #b42318;
}

.status.production-requested {
  background: var(--primary-2);
}

.status.production-preparing {
  background: #7a5af8;
}

.status.production-ready {
  background: var(--ok);
}

.status.production-picked_up {
  background: #3a7d44;
}

.status.production-cancelled {
  background: #667085;
}

.status-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 260px;
}

.compact-status-cell {
  min-width: 150px;
  flex-wrap: wrap;
  gap: 6px;
}

.request-button {
  min-height: 30px;
  padding: 6px 9px;
  background: #fff3cd;
  border: 1px solid #f1c24b;
  color: #5a3d00;
  font-size: 12px;
}

.compact-request-button {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 11px;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 132px;
}

.procurement-order-form {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.procurement-order-form input {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.compact-row-actions {
  margin-top: 8px;
  min-width: 0;
}

.stock-detail-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
}

.stock-detail-modal-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.stock-detail-modal-grid .wide {
  grid-column: 1 / -1;
}

.stock-detail-modal-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.stock-detail-modal-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.stock-search-match td:first-child {
  box-shadow: inset 5px 0 0 var(--primary-2);
}

.inline-form {
  display: inline;
  margin: 0;
}

td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.stacked-list {
  min-width: 220px;
  line-height: 1.45;
}

.recipient-line,
.quote-line,
.recipe-line {
  display: grid;
  gap: 2px;
  padding: 3px 0;
}

.recipient-line strong {
  color: var(--primary);
  font-size: 12px;
}

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

.shortage-line {
  color: #b42318;
}

.checkbox-section,
.contact-section {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.checkbox-section legend,
.contact-section legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}

.checkbox-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px;
  border-radius: 6px;
  background: #f8fbfd;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.checkbox-line input {
  width: 16px;
  min-height: 16px;
  margin: 1px 0 0;
}

.contact-rows {
  display: grid;
  gap: 10px;
}

.recipe-rows {
  display: grid;
  gap: 10px;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 34px;
  gap: 8px;
  align-items: end;
}

.recipe-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(86px, 0.45fr) minmax(0, 0.9fr) 34px;
  gap: 8px;
  align-items: end;
}

.recipe-row:first-child {
  grid-template-columns: minmax(0, 1.2fr) minmax(86px, 0.45fr) minmax(0, 0.9fr);
}

.recipe-row label {
  min-width: 0;
}

.contact-row:first-child {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.remove-contact-button,
.remove-recipe-button {
  min-height: 38px;
  padding: 0;
}

.add-contact-button {
  margin-top: 10px;
}

.secondary {
  background: #e8eef5;
  color: var(--primary);
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.request-dialog {
  width: min(860px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.28);
}

.request-dialog::backdrop {
  background: rgba(11, 27, 43, 0.55);
}

.request-dialog > form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.stock-detail-dialog-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.detail-code {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.detail-production {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 7px;
  background: #f2f6fb;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

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

.dialog-header h2 {
  margin: 0;
  font-size: 20px;
}

.dialog-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

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

.request-facts div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.request-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.request-facts dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.production-actions {
  display: grid;
  gap: 8px;
  min-width: 240px;
}

.production-ready-form {
  display: grid;
  gap: 8px;
}

.quote-form {
  display: grid;
  gap: 14px;
}

.quote-price-section {
  grid-column: auto;
}

.quote-price-grid {
  display: grid;
  gap: 10px;
}

.quote-price-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(90px, 140px) minmax(160px, 1fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.quote-price-row > small {
  color: var(--muted);
}

.notice {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.notice.success {
  border-color: #b7dfb5;
  background: #edf8ed;
}

.notice.warning {
  border-color: #f1ce70;
  background: #fff7df;
}

.notice.error {
  border-color: #f1b5b5;
  background: #fff0f0;
}

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

  .topbar-actions,
  .panel-header {
    align-items: stretch;
    justify-content: flex-start;
  }

  .metrics,
  .grid.two,
  .grid.three,
  .grid.four,
  .form-grid,
  .definition-add-form,
  .term-add-form,
  .movement-form-grid,
  .setup-form,
  .setup-actions,
  .stock-search-bar,
  .checkbox-grid,
  .contact-row,
  .contact-row:first-child,
  .recipe-row,
  .recipe-row:first-child,
  .request-facts,
  .quote-price-row,
  .stock-detail-modal-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  }

  .status-cell,
  .row-actions,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-stock-table .status-cell {
    align-items: center;
    flex-direction: row;
  }

  .stock-detail-modal-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .stock-card-table tbody tr.critical-stock-row td:first-child,
  .dashboard-stock-table tbody tr.critical-stock-row td:first-child,
  .stock-card-table tbody tr.critical-stock-row .status.kritik,
  .dashboard-stock-table tbody tr.critical-stock-row .status.kritik {
    animation: none;
  }

  .stock-card-table tbody tr.critical-stock-row td,
  .dashboard-stock-table tbody tr.critical-stock-row td {
    background: #ffe1e1;
  }
}
