:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef5f8;
  color: #082b45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef5f8;
}

.app {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 14px;
}

.top {
  background: #073b5d;
  color: white;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
}

.top p {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6ee7d8;
}

.top h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.1;
}

#syncState {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: 13px;
}

.panel {
  background: white;
  border: 1px solid #cad9e3;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(9, 44, 66, .08);
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

select,
input {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  border: 1px solid #b7cad8;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 18px;
  color: #072c48;
  background: white;
}

.auto h2,
.status h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

dl {
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e5eef5;
}

dl div:last-child {
  border-bottom: 0;
}

dt {
  color: #52708a;
}

dd {
  margin: 0;
  font-weight: 800;
}

.length-row {
  margin-top: 6px;
  padding: 12px 10px;
  border: 0;
  border-radius: 8px;
  background: #eaf6ff;
}

.length-row dt {
  color: #063b5f;
  font-weight: 800;
}

.length-row dd {
  color: #005eb8;
  font-size: 20px;
}

button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: #0c7bdc;
  color: white;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}

button:disabled {
  cursor: progress;
  background: #89a8be;
}

#retryAction {
  margin-top: 8px;
  background: #d44b3e;
}

.message {
  margin: 12px 0 0;
  color: #516b82;
  font-size: 14px;
}

.status strong {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eafaf4;
  color: #007f4f;
  font-size: 13px;
  letter-spacing: 1px;
}

.history h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.history-state,
.history-empty {
  margin: 0;
  color: #516b82;
  font-size: 14px;
}

.history-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.history-summary span {
  border-radius: 8px;
  background: #eef5f8;
  padding: 10px;
  color: #52708a;
  font-size: 13px;
}

.history-summary b {
  display: block;
  color: #082b45;
  font-size: 22px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  border-top: 1px solid #e5eef5;
  padding-top: 9px;
}

.history-item span {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  background: #073b5d;
  color: white;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 800;
}

.history-item.selectable {
  cursor: pointer;
}

.select-open-record {
  width: auto;
  min-height: 34px;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background: #073b5d;
  font-size: 12px;
}

.history-item strong,
.history-item small {
  display: block;
}

.history-item small {
  color: #52708a;
  margin-top: 3px;
}

@media (min-width: 720px) {
  .app {
    padding-top: 28px;
  }
}
