* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7f8;
  color: #172026;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

tinbox-app {
  display: block;
  min-height: 100vh;
}

.shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.subtitle {
  margin: 4px 0 0;
  color: #63717a;
  font-size: 14px;
}

form,
.panel,
.task {
  background: #ffffff;
  border: 1px solid #dbe2e6;
  border-radius: 8px;
  padding: 14px;
}

form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #43505a;
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5db;
  border-radius: 6px;
  padding: 10px 11px;
  color: #172026;
  background: #ffffff;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

button {
  border: 1px solid #b8c5cc;
  border-radius: 6px;
  background: #ffffff;
  color: #172026;
  padding: 9px 12px;
  cursor: pointer;
}

button.primary {
  background: #1f6f8b;
  border-color: #1f6f8b;
  color: #ffffff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.file-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b8c5cc;
  border-radius: 6px;
  background: #ffffff;
  color: #172026;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 16px;
}

.file-button input {
  display: none;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
  background: #eef5f7;
  border-color: #bfd4dc;
}

.attachment span {
  color: #667782;
  font-size: 12px;
  white-space: nowrap;
}

.pending .attachment {
  background: #fff7e8;
  border-color: #dfc28b;
}

.queue {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.task {
  display: grid;
  gap: 8px;
}

.task-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.title {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.meta {
  color: #667782;
  font-size: 12px;
  white-space: nowrap;
}

.body {
  color: #35424b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.custom-fields {
  display: grid;
  gap: 8px;
}

.custom-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.fields {
  display: grid;
  gap: 6px;
  margin: 0;
}

.fields div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px;
}

.fields dt {
  color: #667782;
  font-size: 13px;
}

.fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.error {
  color: #9b1c1c;
  background: #fff1f1;
  border: 1px solid #f0b9b9;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
}

.empty {
  color: #63717a;
  padding: 18px 0;
  text-align: center;
}
