:root {
  color-scheme: light;
  --bg: #f8fbfa;
  --bg-strong: #eaf1ff;
  --surface: #ffffff;
  --surface-subtle: #f7faff;
  --surface-tint: #eaf2ff;
  --ink: #182235;
  --ink-strong: #07152f;
  --muted: #65738b;
  --muted-strong: #40506b;
  --line: #d8e2f2;
  --line-strong: #b9c9e2;
  --nav: #3368c7;
  --nav-2: #2458b4;
  --accent: #3368c7;
  --accent-strong: #244fa2;
  --accent-soft: #e4edff;
  --blue: #3368c7;
  --blue-soft: #e4edff;
  --amber: #ff8a1e;
  --amber-soft: #fff1d6;
  --yellow: #ffd33f;
  --yellow-soft: #fff8cf;
  --red: #ef3b2d;
  --red-soft: #ffe2df;
  --green: #217a3b;
  --green-soft: #ddf0e2;
  --purple: #7556a2;
  --purple-soft: #ece5f5;
  --focus: #2f80ed;
  --shadow: 0 18px 38px rgba(28, 78, 162, 0.13);
  --shadow-soft: 0 8px 20px rgba(28, 78, 162, 0.08);
  --radius: 8px;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(232, 241, 255, 0.96), rgba(255, 255, 255, 0) 300px),
    var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 22px 14px;
  background: var(--nav);
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 10px 0 28px rgba(28, 78, 162, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 4px 8px;
}

.brand-logo {
  display: block;
  width: 86px;
  height: 52px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(8, 38, 89, 0.24);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: #ffffff;
  color: var(--nav);
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(8, 38, 89, 0.24);
}

.brand-title {
  display: block;
  color: #ffffff;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  color: #d9e6ff;
  font-size: 12px;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #ffffff;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav-button::before {
  content: attr(data-icon);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-button.active {
  border-color: rgba(255, 255, 255, 0.34);
  background: #ffffff;
  color: var(--nav-2);
}

.nav-button.active::before {
  background: linear-gradient(180deg, var(--red), var(--amber));
  color: #ffffff;
}

.session-panel {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 10px 8px 0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 760;
}

.session-button {
  width: 100%;
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.52);
  color: #ffffff;
}

.language-control {
  display: grid;
  gap: 7px;
  margin-top: 0;
  padding: 10px 8px 2px;
  color: #d9e6ff;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(51, 104, 199, 0.18), rgba(255, 211, 63, 0.16)),
    var(--bg);
}

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

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: var(--nav);
  color: #ffffff;
}

.login-brand .brand-logo {
  width: 118px;
  height: 70px;
}

.login-copy {
  margin: 10px 0 18px;
}

.login-language {
  margin: 0 0 18px;
}

.login-language .language-control {
  padding: 0;
  color: var(--muted-strong);
}

.login-language .language-control label {
  color: var(--muted-strong);
}

.login-language .language-select {
  box-shadow: none;
}

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

.login-form .button {
  width: 100%;
  margin-top: 4px;
}

.login-error {
  margin: 0 0 14px;
  border: 1px solid #efc2bd;
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 720;
}

.language-control label {
  color: inherit;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.language-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
  font-weight: 680;
  box-shadow: 0 8px 18px rgba(8, 38, 89, 0.18);
}

.language-select:focus {
  border-color: var(--yellow);
  outline: 3px solid rgba(255, 211, 63, 0.24);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 30px;
  line-height: 1.12;
}

h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.2;
}

h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 15px;
}

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

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(16, 20, 17, 0.02);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button:hover,
.icon-button:hover {
  border-color: #aab6ad;
  box-shadow: 0 5px 14px rgba(24, 32, 28, 0.08);
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--accent);
  background: linear-gradient(180deg, #3c78df, var(--accent));
  color: #ffffff;
}

.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.ghost {
  background: transparent;
  box-shadow: none;
}

.button.danger,
.icon-button.danger {
  border-color: #efc2bd;
  background: #fffafa;
  color: var(--red);
}

.button.compact {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  width: auto;
  height: 18px;
  padding: 0 2px;
  color: currentColor;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.icon-button {
  min-width: 32px;
  min-height: 32px;
  padding: 5px 8px;
}

.download-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: min(420px, calc(100vw - 28px));
  border: 1px solid #b8c8e8;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(21, 44, 92, 0.18);
}

.download-toast.error {
  border-color: #efc2bd;
}

.download-toast-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.download-toast p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.download-toast .button {
  margin-top: 12px;
}

.download-link-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 760;
}

.download-link-field .field {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
}

.download-actions {
  justify-content: flex-start;
  margin-top: 0;
}

.download-filename {
  overflow-wrap: anywhere;
  color: var(--ink-strong) !important;
  font-weight: 700;
}

.download-progress {
  position: relative;
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8efff;
}

.download-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
  animation: download-progress 1s ease-in-out infinite;
}

@keyframes download-progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(240%);
  }
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--amber), var(--red));
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, var(--surface-subtle));
  border-radius: var(--radius) var(--radius) 0 0;
}

.panel-body {
  padding: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  position: relative;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.metric:nth-child(2)::before {
  background: var(--blue);
}

.metric:nth-child(3)::before {
  background: var(--yellow);
}

.metric:nth-child(4)::before {
  background: var(--red);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.metric-value {
  display: block;
  margin-top: 8px;
  color: var(--ink-strong);
  font-size: 25px;
  font-weight: 790;
  line-height: 1.05;
}

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

.search {
  width: min(380px, 100%);
}

.quote-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  width: min(760px, 100%);
}

.filter-control {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.status-filter-select {
  width: 226px;
  font-weight: 650;
}

.field,
.search,
.table-input,
.table-select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.search {
  padding-left: 34px;
  background:
    linear-gradient(transparent, transparent),
    #ffffff;
  background-image:
    radial-gradient(circle at 16px 50%, transparent 0, transparent 5px, transparent 5px),
    linear-gradient(#ffffff, #ffffff);
}

.field:hover,
.search:hover,
.table-input:hover,
.table-select:hover {
  border-color: #aeb9b0;
}

.field:focus,
.search:focus,
.table-input:focus,
.table-select:focus,
textarea:focus {
  border-color: var(--focus);
  outline: 3px solid rgba(47, 128, 237, 0.15);
}

textarea.field,
textarea.table-input {
  min-height: 92px;
  resize: vertical;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f9ff;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

tbody tr:hover {
  background: #fbfdfb;
}

td:first-child,
th:first-child {
  padding-left: 14px;
}

td:last-child,
th:last-child {
  width: 166px;
}

.row-actions {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: start;
  gap: 4px;
}

.status-select {
  width: 244px;
  font-weight: 650;
}

.pcp-select {
  width: 104px;
  font-weight: 650;
}

.proposal-send-method-select {
  width: 162px;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
}

.status-Em-Andamento {
  background: var(--blue-soft);
  color: #2458b4;
}

.status-Enviado-Aguardando-Resposta {
  background: var(--amber-soft);
  color: #944d00;
}

.status-Produzindo-Amostra {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-Perdido {
  background: #ece8e6;
  color: #5c514d;
}

.status-Em-Revisao {
  background: var(--purple-soft);
  color: var(--purple);
}

.status-Pedido-Fechado {
  background: var(--green-soft);
  color: #16662e;
}

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

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

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

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

.form-grid .span-3 {
  grid-column: span 3;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 760;
}

label .field,
label textarea,
label select,
label input {
  color: var(--ink);
  font-weight: 450;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.line-table .table-input,
.line-table .table-select {
  width: 100%;
}

.line-table textarea.table-input {
  min-height: 58px;
}

.line-table .qty {
  width: 88px;
}

.line-table .money {
  width: 126px;
}

.line-total {
  color: var(--ink-strong);
  font-weight: 790;
  white-space: nowrap;
}

.total-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 790;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.split-layout form {
  position: sticky;
  top: 24px;
}

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

.split-layout form .form-grid .span-2,
.split-layout form .form-grid .span-3,
.split-layout form .form-grid .span-4 {
  grid-column: auto;
}

.split-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.split-grid > form {
  position: sticky;
  top: 24px;
}

.user-password-field {
  min-width: 160px;
}

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

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

.danger-text {
  color: var(--red);
  font-weight: 700;
}

.success-text {
  color: var(--green);
  font-weight: 700;
}

.help-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-tint);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.tag button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(180, 35, 24, 0.1);
  color: var(--red);
  padding: 0;
  font-weight: 800;
}

.audit-tag {
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--nav-2);
}

.severity-info {
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
}

.severity-warning {
  border-radius: 7px;
  background: var(--amber-soft);
  color: #944d00;
}

.severity-error {
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
}

.audit-message {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.audit-agent {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.footer-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
    gap: 12px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(29, 72, 61, 0.08);
  }

  .brand {
    min-width: max-content;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    overflow: visible;
  }

  .nav-button {
    width: auto;
    min-width: max-content;
  }

  .language-control {
    width: 190px;
    margin-top: 0;
    padding: 0;
  }

  .session-panel {
    width: 150px;
    margin-top: 0;
    padding: 0;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

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

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

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

  .split-layout form,
  .split-grid > form {
    position: static;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: minmax(120px, 30%) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  td:first-child,
  th:first-child {
    padding-left: 12px;
  }

  td:last-child,
  th:last-child {
    width: auto;
  }

  td[data-label]::before {
    content: attr(data-label);
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 820;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  td.empty {
    display: block;
  }

  td.empty::before {
    content: none;
  }

  .status-select,
  .field,
  .search,
  .table-input,
  .table-select {
    width: 100%;
    min-width: 0;
  }

  .row-actions {
    justify-content: start;
  }

  .line-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .line-table .qty,
  .line-table .money {
    width: 100%;
  }

  .line-table textarea.table-input {
    min-height: 78px;
  }

  .total-bar {
    justify-content: flex-start;
    padding: 12px 0 0;
  }
}

@media (max-width: 860px) {
  .main {
    padding: 16px;
  }

  .summary-grid,
  .form-grid,
  .form-grid.two,
  .form-grid.three,
  .split-layout {
    grid-template-columns: 1fr;
  }

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

  .topbar,
  .panel-header,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-filters {
    justify-content: flex-start;
    width: 100%;
  }

  .quote-filters .search,
  .status-filter-select {
    width: 100%;
  }

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

  h1 {
    font-size: 26px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 13px;
  }

  .main {
    padding: 14px;
  }

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

  .nav {
    width: 100%;
  }

  .nav-button {
    flex: 0 0 auto;
  }

  .language-control {
    width: 100%;
  }

  .session-panel {
    width: 100%;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar .actions,
  .topbar .button {
    width: 100%;
  }

  .panel-body,
  .panel-header {
    padding: 14px;
  }

  .metric {
    min-height: 92px;
  }

  .metric-value {
    font-size: 24px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  td:first-child,
  th:first-child {
    padding-left: 12px;
  }

  td:last-child,
  th:last-child {
    width: auto;
  }

  td[data-label]::before {
    content: attr(data-label);
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 820;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  td.empty {
    display: block;
  }

  td.empty::before {
    content: none;
  }

  .status-select,
  .field,
  .search,
  .table-input,
  .table-select {
    width: 100%;
    min-width: 0;
  }

  .row-actions {
    justify-content: start;
  }

  .line-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .line-table .qty,
  .line-table .money {
    width: 100%;
  }

  .line-table textarea.table-input {
    min-height: 78px;
  }

  .total-bar {
    justify-content: flex-start;
    padding: 12px 0 0;
  }
}

@media (max-width: 430px) {
  .brand {
    width: 100%;
  }

  .brand-title {
    font-size: 14px;
  }

  .nav-button {
    min-height: 38px;
    padding: 8px 10px;
  }

  .summary-grid {
    gap: 10px;
  }

  td {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .row-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  .row-actions .icon-button {
    width: 100%;
  }
}
