:root {
  color-scheme: light;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: #172033;
  background: #f4f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef4ff, #f8fbff);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(720px, 100%);
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(23, 32, 51, 0.12);
  padding: 24px;
}

.auth-screen {
  max-width: 520px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.subtitle {
  margin: 0 0 8px;
  color: #5f6b7a;
}

.status-text {
  margin: 0 0 18px;
  color: #4468f6;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-password-field {
  position: relative;
}

.auth-password-field input {
  padding-right: 72px;
}

.auth-actions,
.auth-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.auth-status {
  margin: 0;
  color: #5f6b7a;
  font-size: 0.95rem;
}

.helper-text {
  margin: 0;
  color: #6d7788;
  font-size: 0.9rem;
}

.task-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 14px;
}

input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  font: inherit;
}

button {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: #4468f6;
  color: white;
  font: inherit;
  cursor: pointer;
}

button:hover {
  background: #3455d3;
}

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

.secondary-btn {
  background: #eef2ff;
  color: #3654c8;
}

.secondary-btn:hover {
  background: #e1e8ff;
}

.icon-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  background: transparent;
  color: #3654c8;
  border-radius: 999px;
}

.icon-btn:hover {
  background: #eef2ff;
}

.link-btn {
  padding: 0;
  background: transparent;
  color: #3654c8;
  border-radius: 0;
}

.link-btn:hover {
  background: transparent;
  text-decoration: underline;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

.filter-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.filter-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.filter-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.filter-box {
  color: #5f6b7a;
  font-size: 0.95rem;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  border: none;
  margin: 0;
  padding: 0;
}

.filter-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f3f6fd;
  color: #3654c8;
  font-size: 0.85rem;
  line-height: 1.1;
}

.filter-option input[type="checkbox"],
.checkbox-box input[type="checkbox"] {
  flex: 0 0 auto;
  min-width: auto;
  width: 14px;
  height: 14px;
  padding: 0;
  margin: 0;
}

.checkbox-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5f6b7a;
  font-size: 0.95rem;
  margin: 0;
  padding: 0;
}

.checkbox-right {
  justify-self: end;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f9fbff;
  border: 1px solid #e6edf7;
  border-radius: 12px;
}

.task-main {
  display: flex;
  gap: 10px;
  flex: 1;
}

.task-text {
  flex: 1;
}

.task-text.completed {
  text-decoration: line-through;
  color: #7a8494;
}

.task-meta {
  color: #6d7788;
  font-size: 0.9rem;
  margin-top: 4px;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.done-btn {
  background: #ebf7ee;
  color: #207a3c;
}

.done-btn:hover {
  background: #dff3e6;
}

.delete-btn {
  background: #ffefef;
  color: #b93030;
}

.delete-btn:hover {
  background: #f7dada;
}

.empty-state {
  text-align: center;
  color: #6d7788;
  padding: 24px 0;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
