/* Базовый сброс и переменные */
:root {
  --bg: #f7f5f0;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #1f6bff;
  --accent-dim: #e8efff;
  --danger: #d63b3b;
  --ok: #1a9d5e;
  --line: #e4e1d8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Лендинг ===== */
.hero {
  background: linear-gradient(180deg, #1f6bff 0%, #4d8bff 100%);
  color: #fff;
  padding: 48px 16px 56px;
}
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.hero h1 { margin: 0 0 8px; font-size: 32px; font-weight: 700; }
.brand-tag {
  display: inline-block;
  background: rgba(255,255,255,.18);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  margin-left: 8px;
  vertical-align: 4px;
}
.lead { margin: 0; font-size: 17px; opacity: .95; }

.container { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 600px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 8px; font-size: 20px; }
.card p { margin: 0 0 16px; color: var(--muted); }
.card .btn { width: 100%; }

.btn {
  display: inline-block;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn-secondary { background: var(--accent-dim); color: var(--accent); }
.btn-danger { background: var(--danger); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.hint { font-size: 12px; color: var(--muted); margin-top: 12px; }

.features {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.features h3 { margin: 0 0 12px; }
.features ol { margin: 0; padding-left: 20px; }
.features li { margin-bottom: 6px; }

.foot {
  text-align: center;
  padding: 16px;
  color: var(--muted);
}

/* ===== Приложение (app.html) ===== */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header .brand { font-weight: 700; font-size: 16px; }
.app-header .me {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-header .me img {
  width: 32px; height: 32px; border-radius: 50%;
}
.app-header .me .name { font-size: 14px; }
.app-header .me .role {
  font-size: 11px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
}
.tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  gap: 8px;
}
.tabs a {
  padding: 12px 4px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: 14px;
}
.tabs a.active { color: var(--fg); border-color: var(--accent); font-weight: 600; }

.app-main { max-width: 720px; margin: 0 auto; padding: 16px; }

.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.order-card .row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.order-card .service { font-weight: 600; font-size: 15px; }
.order-card .region { color: var(--muted); font-size: 13px; }
.order-card .desc { font-size: 14px; margin: 8px 0; white-space: pre-wrap; }
.order-card .row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 8px;
  flex-wrap: wrap;
}
.order-card .budget { font-weight: 600; }
.order-card .meta { font-size: 12px; color: var(--muted); }
.status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.status-new { background: #e8efff; color: var(--accent); }
.status-assigned { background: #fff4d6; color: #946800; }
.status-in_progress { background: #d6f0ff; color: #0068a8; }
.status-done { background: #d8f3e0; color: var(--ok); }
.status-canceled { background: #ffe2e2; color: var(--danger); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--muted); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 80px; }

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius);
  z-index: 100;
  max-width: 90%;
  font-size: 14px;
}
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }

.bids-list { margin-top: 12px; }
.bid {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.bid:first-child { border-top: none; }
.bid .bid-name { font-weight: 600; }
.bid .bid-meta { font-size: 12px; color: var(--muted); }
.bid .bid-actions { margin-top: 8px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  border: none;
  cursor: pointer;
}
.chip.active { background: var(--accent); color: #fff; }