@font-face {
  font-family: "Play";
  src: url("/fonts/Play-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Play";
  src: url("/fonts/Play-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #0f0f0f;
  color: #ffffff;
}

body {
  font-family: "Play", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
}

button, input, a {
  font-family: "Play", sans-serif;
}

button, input {
  border-radius: 0;
}

a {
  color: #ffffff;
}

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

.top h1, .person h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost, .back {
  background: #0f0f0f;
  color: #ffffff;
  border: 1px solid #2a2a2a;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login {
  max-width: 420px;
  margin: 12vh auto 0;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: 24px 20px;
}

.login h1 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login input {
  width: 100%;
  background: #0f0f0f;
  color: #ffffff;
  border: 1px solid #2a2a2a;
  min-height: 48px;
  padding: 0 12px;
  font-size: 16px;
}

.login button, .status {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  background: #ff5500;
  color: #0f0f0f;
  border: 1px solid #ff5500;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: #ff5500;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: 10px 12px;
}

.card-head, .who {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.num {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.muted {
  color: #8d8d8d;
  font-size: 12px;
}

.title {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.price {
  margin: 4px 0 0;
  color: #ff5500;
  font-size: 14px;
  font-weight: 700;
}

.fields {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.fields li {
  padding: 4px 0;
  border-top: 1px solid #2a2a2a;
}

.fields b {
  display: block;
  color: #8d8d8d;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.who {
  margin-top: 8px;
}

.who a {
  text-decoration: none;
  border-bottom: 1px solid #ff5500;
}

.statuses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.status {
  margin-top: 0;
  min-height: 36px;
  background: #0f0f0f;
  color: #ffffff;
  border: 1px solid #2a2a2a;
  min-width: 0;
  padding: 4px;
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.15;
  white-space: normal;
}

.status.on[data-status="в работе"] {
  background: #ff5500;
  border-color: #ff5500;
  color: #0f0f0f;
}

.status.on[data-status="выполнена"] {
  background: #ffffff;
  border-color: #ffffff;
  color: #0f0f0f;
}

.status.on[data-status="переделываем"] {
  background: #c9a227;
  border-color: #c9a227;
  color: #0f0f0f;
}

.person {
  margin-bottom: 16px;
}

.person .muted {
  margin: 6px 0 0;
}

.person .tg {
  display: inline-flex;
  margin-top: 12px;
  min-height: 44px;
  padding: 0 14px;
  align-items: center;
  background: #ff5500;
  color: #0f0f0f;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty {
  border: 1px solid #2a2a2a;
  padding: 20px;
  color: #8d8d8d;
}

.pays {
  margin: 0 0 16px;
}

.pays h2 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pay {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: 12px;
  margin-bottom: 8px;
}

.pay-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.pay-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  background: #0f0f0f;
  color: #ffffff;
  border: 1px solid #2a2a2a;
  padding: 0 12px;
  font-size: 16px;
}

.pay-save {
  min-height: 44px;
  padding: 0 14px;
  background: #ff5500;
  color: #0f0f0f;
  border: 1px solid #ff5500;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pay-note {
  min-height: 1em;
  margin: 8px 0 0;
  color: #ff5500;
  font-size: 12px;
}

@media (min-width: 760px) {
  body {
    padding: 28px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1180px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
