* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: #FAFAFC;
  color: #2B2E3D;
}
.wrap { max-width: 480px; margin: 0 auto; padding-bottom: 40px; }

/* ---- Auth screens ---- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 30px rgba(43,46,61,0.08);
}
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #9CA0B5; margin-bottom: 4px; }
.auth-title { font-size: 24px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.auth-sub { font-size: 13px; color: #9CA0B5; margin-bottom: 20px; }
label.field-label { font-size: 12px; font-weight: 700; color: #9CA0B5; margin: 14px 0 6px; display: block; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%;
  border: 1.5px solid #EAEAF0;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  color: #2B2E3D;
  background: #FBFBFD;
  font-family: inherit;
}
.btn-primary {
  width: 100%;
  margin-top: 18px;
  padding: 13px 18px;
  border-radius: 12px;
  border: none;
  background: #2B2E3D;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:disabled { opacity: .5; cursor: default; }
.switch-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #6B6F85;
  text-decoration: none;
}
.error-box {
  font-size: 12.5px;
  color: #B23B3B;
  background: #FBEAEA;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 10px;
}

/* ---- App header ---- */
header.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px 12px;
}
h1.app-title { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.header-actions { display: flex; gap: 8px; }
.icon-btn, .add-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 1.5px solid #EAEAF0;
  background: #fff; color: #6B6F85; display: flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none; font-size: 18px;
}
.add-btn { background: #2B2E3D; color: #fff; border: none; box-shadow: 0 4px 14px rgba(43,46,61,.25); font-size: 22px; font-weight: 700; }

/* ---- Search & filters ---- */
form.search-form { margin: 4px 20px 14px; }
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: #F0F1F5; border-radius: 12px;
}
.search-wrap input { border: none; background: transparent; flex: 1; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; border: none; cursor: pointer;
}
.chip .count { font-size: 11px; opacity: .85; background: rgba(0,0,0,.06); border-radius: 999px; padding: 1px 6px; }
.chip.active .count { background: rgba(255,255,255,.25); }

/* ---- Order list ---- */
.list { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; color: #9CA0B5; font-size: 14px; text-align: center;
}
.card {
  display: flex; align-items: flex-start; gap: 12px; background: #fff; border-radius: 16px;
  padding: 14px; box-shadow: 0 1px 3px rgba(43,46,61,.06);
}
.status-dot {
  width: 34px; height: 34px; border-radius: 10px; border: none; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; cursor: pointer; font-size: 15px;
}
.card-body { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.card-title { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { font-size: 12.5px; color: #9CA0B5; display: flex; gap: 4px; flex-wrap: wrap; }
.card-note { font-size: 12.5px; color: #6B6F85; margin-top: 6px; line-height: 1.4; }
.card-author { font-size: 11px; color: #C7CADA; margin-top: 4px; }
.badge { font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; flex-shrink: 0; white-space: nowrap; }
.delete-btn { border: none; background: transparent; cursor: pointer; padding: 4px; flex-shrink: 0; color: #C7CADA; font-size: 16px; }

/* ---- Form page ---- */
.form-card { background: #fff; border-radius: 20px; padding: 20px; margin: 16px 20px; box-shadow: 0 1px 3px rgba(43,46,61,.06); }
.status-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.status-option {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  border: 1.5px solid transparent; font-size: 12.5px; font-weight: 600; cursor: pointer; background: #F7F7FA; color: #9CA0B5;
}
.status-option input { display: none; }
.row2 { display: flex; gap: 10px; }
.row2 > div { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.btn-danger {
  padding: 13px 18px; border-radius: 12px; border: 1.5px solid #F3D6D6; background: #fff;
  color: #B23B3B; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.toast {
  max-width: 440px; margin: 10px 20px 0; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; background: #2B2E3D; color: #fff;
}
