* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f7f4;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: #263238;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 4px;
}

nav a:hover {
  background: #3f515a;
}

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

h1 {
  margin: 0 0 18px;
  font-size: 24px;
}

h2 {
  margin: 22px 0 12px;
  font-size: 18px;
}

form {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

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

label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px;
  border: 1px solid #b9c0c3;
  border-radius: 4px;
  background: #fff;
  color: #222;
}

textarea {
  min-height: 80px;
}

button,
.button {
  width: fit-content;
  padding: 8px 11px;
  border: 0;
  border-radius: 4px;
  background: #006b5f;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button:hover {
  background: #00534a;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}

th,
td {
  padding: 7px 8px;
  border-bottom: 1px solid #e0e0dc;
  text-align: left;
  vertical-align: middle;
  line-height: 1.15;
}

th {
  background: #ecebe4;
}

td .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 28px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  font-size: 12px;
}

table tbody td > a.button {
  min-width: 46px !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 3px 7px !important;
  margin: 2px 0;
  border-radius: 4px;
  font-size: 11px !important;
  line-height: 1 !important;
}

td .button.compact-action {
  min-width: 46px;
}

.message {
  padding: 10px;
  margin-bottom: 14px;
  border-left: 4px solid #006b5f;
  background: #eef8f5;
}

.charge-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.small-button {
  min-width: 40px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: #263238;
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.small-button:hover {
  background: #3f515a;
}

.danger-button {
  background: #8a2f2f;
}

.danger-button:hover {
  background: #6f2424;
}

.notes-list {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.note-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.note-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid #d8ddd7;
  background: #fff;
  font-weight: 400;
}

.check-row input {
  width: auto;
  margin-top: 2px;
}
