:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #20324b;
  background: #f3f6fa;
  line-height: 1.5;
  font-size: 15px;
  --accent: #176b83;
  --line: #dbe3ec;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 22px max(24px, calc((100vw - 1240px) / 2));
  background: white;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
header img {
  max-width: 220px;
  max-height: 65px;
  object-fit: contain;
}
nav {
  display: flex;
  gap: 22px;
  flex: 1;
  flex-wrap: wrap;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 42px 24px;
  min-height: 75vh;
}
h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 5px 0 26px;
  letter-spacing: -1px;
  font-weight: 300;
}
h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: 0 5px 18px #20324b05;
}
.auth {
  max-width: 480px;
  margin: 20px auto;
}
.auth form {
  display: grid;
  gap: 18px;
}
.auth > a {
  display: inline-block;
  margin-top: 20px;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}
input,
select {
  font: inherit;
  border: 1px solid #becbd8;
  border-radius: 7px;
  padding: 10px 12px;
  min-width: 0;
  color: inherit;
  background: white;
}
input:focus,
select:focus {
  outline: 3px solid #176b8330;
  border-color: var(--accent);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
button,
.button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 7px;
  padding: 11px 17px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  display: inline-block;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
  text-decoration: none;
}
.secondary {
  background: #e8eef4;
  color: #20324b;
}
.danger {
  background: #b43c43;
}
.notice {
  padding: 13px 17px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.notice.success {
  background: #e5f4ed;
  color: #216446;
}
.notice.error {
  background: #fbecec;
  color: #973d42;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.metric {
  display: grid;
  gap: 14px;
}
.metric strong {
  font-size: 44px;
  color: #20324b;
}
.metric span {
  font-size: 18px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.grid p {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.toolbar,
.filters,
.bulk-actions,
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar {
  justify-content: space-between;
  margin-bottom: 20px;
}
.bulk-actions {
  margin: 15px 0;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 12px;
  color: #5c6e85;
  background: #f5f8fb;
}
td,
th {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td input:not([type="checkbox"]) {
  width: 100%;
  min-width: 140px;
}
.row-field[readonly] {
  border-color: transparent;
  background: transparent;
  padding-left: 0;
}
.row-field:disabled {
  opacity: 1;
  color: inherit;
}
.new-row {
  background: #fff5d6;
}
tr.success {
  background: #effaf4;
}
.row-success {
  display: inline-flex;
  color: #216446;
  vertical-align: middle;
}
tr.error {
  background: #fff1f0;
}
td form {
  display: inline-block;
  margin-left: 10px;
}
.order-buttons {
  white-space: nowrap;
}
.order-buttons button {
  padding: 5px 10px;
  background: #e8eef4;
  color: #20324b;
}
.order-buttons button + button {
  margin-left: 8px;
}
.pagination {
  justify-content: flex-end;
  padding-top: 20px;
}
.pagination span {
  margin-right: auto;
}
details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
details form {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: inherit;
}
dialog::backdrop {
  background: #13263e99;
}
dialog label {
  margin: 20px 0;
}
#drop-zone {
  padding: 25px;
  border: 2px dashed #b6cbd4;
  background: #f3f8fa;
  text-align: center;
}
.dragover {
  outline: 3px solid var(--accent);
}
.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.download p {
  color: #67768a;
  overflow-wrap: anywhere;
}
footer {
  text-align: center;
  color: #7c899b;
  padding: 24px;
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  header {
    gap: 18px;
    padding: 18px 20px;
  }
  nav {
    order: 3;
    flex-basis: 100%;
    gap: 16px;
  }
  header img {
    max-width: 170px;
  }
  main {
    padding: 28px 16px;
  }
  .card {
    padding: 18px;
  }
  .grid,
  .cards {
    grid-template-columns: 1fr;
  }
  .filters {
    width: 100%;
  }
  .filters input {
    flex: 1;
    width: 130px;
  }
  .download {
    align-items: flex-start;
    flex-direction: column;
  }
  td,
  th {
    padding: 12px 8px;
  }
}
