:root {
  --ink: #1f2a2e;
  --panel: #ffffff;
  --muted: #66757b;
  --line: #d6dee2;
  --soft: #eef3f5;
  --accent: #0f766e;
  --accent-2: #37474f;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f7f8;
  font-family: Arial, Helvetica, sans-serif;
}

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

button {
  border: 0;
  border-radius: 6px;
  padding: 9px 13px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

button.secondary {
  color: var(--ink);
  background: #e2e8ec;
}

button.danger {
  background: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

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

.login-box {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 18px 40px rgb(31 42 46 / 10%);
}

.login-box h1,
.page-title h1 {
  margin: 0;
  font-size: 24px;
}

.login-box p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.field label {
  font-weight: 700;
  font-size: 13px;
}

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

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 18px auto 40px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.tab {
  color: var(--ink);
  background: #dfe7ea;
}

.tab.active {
  color: #fff;
  background: var(--accent);
}

.section {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

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

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

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

.span-4 {
  grid-column: span 4;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  color: #fff;
  background: var(--accent-2);
}

td.num,
th.num {
  text-align: right;
}

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

.quote-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.quote-summary {
  display: grid;
  justify-content: end;
  margin-top: 14px;
}

.summary-box {
  min-width: 280px;
  border: 1px solid var(--line);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.summary-row.total {
  color: #fff;
  background: var(--accent-2);
  font-weight: 800;
}

.hint,
.error {
  margin-top: 12px;
  font-size: 13px;
}

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

.error {
  color: var(--danger);
}

@media (max-width: 860px) {
  .grid,
  .grid.two,
  .quote-layout {
    grid-template-columns: 1fr;
  }

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

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