body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1f2933;
  background: #f5f7fa;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: #14555d;
  color: #fff;
}

.brand {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user {
  font-size: 0.95rem;
}

.btn-link {
  background: none;
  border: none;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
}

.content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.auth-card {
  max-width: 360px;
  margin: 4rem auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
}

.auth-card p {
  margin: 0 0 1rem;
}

.auth-card label,
.auth-card input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.auth-card input {
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #bcccdc;
  border-radius: 4px;
}

.auth-card button {
  width: 100%;
  padding: 0.6rem;
  background: #14555d;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.errorlist {
  color: #b00020;
  padding-left: 1rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #14555d;
  border: none;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
}

.task-list {
  list-style: none;
  padding: 0;
}

.task-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
}

.task-list small {
  color: #616e7c;
}

form label,
form input,
form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

form input,
form textarea {
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #bcccdc;
  border-radius: 4px;
  font: inherit;
}

form p {
  margin: 0 0 1rem;
}

.task-title {
  color: #14555d;
  font-weight: 600;
  text-decoration: none;
}

.task-title:hover {
  text-decoration: underline;
}

.task-meta {
  color: #616e7c;
}

.task-description {
  white-space: pre-wrap;
}

.comment {
  border: 1px solid #d9e2ec;
  border-left: 3px solid #9fb3c8;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.comment-author {
  font-weight: 600;
}

.comment-meta time {
  color: #616e7c;
  font-size: 0.85rem;
}

.saved-indicator {
  color: #2f9e44;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.8s ease;
  animation: saved-fade 3s ease forwards;
}

@keyframes saved-fade {
  0% { opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.comment-form {
  margin-top: 1rem;
}

.comment-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #bcccdc;
  border-radius: 4px;
  font: inherit;
  resize: vertical;
}

.form-errors {
  color: #b00020;
  font-size: 0.9rem;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
}

.attachment a {
  color: #14555d;
  text-decoration: none;
  word-break: break-all;
}

.attachment a:hover {
  text-decoration: underline;
}

.attachment-thumb {
  max-width: 140px;
  max-height: 90px;
  width: auto;
  height: auto;
  border: 1px solid #d9e2ec;
  border-radius: 4px;
  display: block;
}

.attachment-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.attachment-meta {
  color: #616e7c;
  font-size: 0.85rem;
}

.comment-file {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.comment-file a {
  color: #14555d;
  text-decoration: none;
}

.comment-file a:hover {
  text-decoration: underline;
}

.attachment-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-name {
  font-size: 0.85rem;
  color: #616e7c;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0;
}

.upload-progress-bar {
  flex: 1;
  height: 8px;
  background: #2f9e44;
  width: 0%;
  border-radius: 4px;
  transition: width 0.1s ease;
}

.upload-progress-text {
  font-size: 0.8rem;
  color: #616e7c;
  white-space: nowrap;
}