:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f9fb;
  color: #17212b;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f7f9fb; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }

.app { min-height: 100vh; }
.hidden { display: none !important; }

.login {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 24px;
}

.login h1 { margin: 0; font-size: 34px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #43515f; font-size: 14px; }
input, textarea, select {
  width: 100%;
  border: 1px solid #c9d3dc;
  border-radius: 8px;
  padding: 13px 12px;
  background: #fff;
  color: #17212b;
}
#taskForm textarea[name="comment"] {
  height: 46px;
  min-height: 46px;
  resize: none;
}
button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #0f6b5f;
  color: #fff;
  font-weight: 700;
}
button.secondary, menu button:first-child { background: #dfe7ee; color: #1e2a35; }

.main { padding-bottom: 24px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid #dfe7ee;
}
.topbar span { display: block; color: #637485; font-size: 13px; margin-top: 2px; }
.status {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 8px;
  background: #dfe7ee;
  color: #17212b;
  font-size: 12px;
  font-weight: 700;
}
.status.online.fast { background: #d9f2e8; color: #0b6b47; }
.status.online.medium { background: #fff1c7; color: #805600; }
.status.online.slow { background: #ffe0c2; color: #9b3f00; }
.status.offline { background: #ffe1df; color: #9b2118; }

.tabs {
  position: sticky;
  top: 62px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #c9d3dc;
  border-bottom: 1px solid #c9d3dc;
}
.tabs button {
  border-radius: 0;
  background: #fff;
  color: #43515f;
  min-height: 48px;
}
.tabs button.active {
  background: #0f6b5f;
  color: #fff;
}

.taskProgress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #dfe7ee;
}
.taskProgressText {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #43515f;
  font-size: 13px;
  font-weight: 700;
}
.taskProgress progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #dfe7ee;
}
.taskProgress progress::-webkit-progress-bar {
  background: #dfe7ee;
  border-radius: 8px;
}
.taskProgress progress::-webkit-progress-value {
  background: #0f6b5f;
  border-radius: 8px;
}
.taskProgress progress::-moz-progress-bar {
  background: #0f6b5f;
  border-radius: 8px;
}

.list {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.card {
  background: #fff;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 9px;
}
.card h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.card p { margin: 0; color: #43515f; }
.meta {
  display: grid;
  gap: 5px;
  color: #43515f;
  font-size: 13px;
}
.sendProgress {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}
.sendProgressHead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #43515f;
}
.sendProgressValue {
  color: #17212b;
  font-weight: 700;
}
.sendProgressBar {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 8px;
  background: #dfe7ee;
  overflow: hidden;
}
.sendProgressBar::-webkit-progress-bar {
  background: #dfe7ee;
  border-radius: 8px;
}
.sendProgressBar::-webkit-progress-value {
  background: #0f6b5f;
  border-radius: 8px;
}
.sendProgressBar::-moz-progress-bar {
  background: #0f6b5f;
  border-radius: 8px;
}
.settings {
  display: grid;
  gap: 16px;
  padding: 16px 14px;
}
.settings h2 {
  margin: 0;
  font-size: 22px;
}
.infoGrid {
  display: grid;
  gap: 10px;
}
.infoRow {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}
.infoRow strong { color: #43515f; }
.dangerButton { background: #b52b22; }
.empty { color: #637485; text-align: center; padding: 28px 12px; }
.error { color: #b52b22; min-height: 20px; }

dialog {
  width: min(94vw, 520px);
  border: 0;
  border-radius: 8px;
  padding: 0;
}
dialog::backdrop { background: rgba(23, 33, 43, 0.55); }
#taskForm { padding: 18px; max-height: 90vh; overflow: auto; }
#taskForm h2 { margin: 0; }
.details {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  background: #f7f9fb;
}
.details div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: 13px; }
.details strong { color: #43515f; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid #dfe7ee; }
menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0; margin: 0; }

@media (min-width: 720px) {
  .list, .settings { max-width: 760px; margin: 0 auto; }
  .login { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 390px) {
  .tabs button { font-size: 12px; padding-left: 6px; padding-right: 6px; }
  .infoRow { grid-template-columns: 1fr; gap: 4px; }
}
