:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #172033;
  background: #f5f7f9;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; background: #f5f7f9; }
button { font: inherit; }
.hidden { display: none !important; }
.app { width: min(920px, 100%); margin: 0 auto; padding: 20px; }

h1 { margin: 0; font-size: 22px; line-height: 1.3; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.page-header p, .message-panel > p { margin: 5px 0 0; color: #7b8595; font-size: 14px; line-height: 1.5; }

.message-panel { max-width: 500px; margin: 40px auto; padding: 32px; border: 1px solid #e7eaee; border-radius: 16px; background: #fff; box-shadow: 0 12px 32px rgb(34 60 80 / 7%); text-align: center; }
.logo { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 15px; background: #31c8f4; color: #fff; font-size: 20px; font-weight: 700; }
.config-summary { margin: 24px 0 0; padding: 0; border-top: 1px solid #eef0f3; text-align: left; }
.config-summary div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid #eef0f3; }
.config-summary dt { color: #7b8595; font-size: 13px; }
.config-summary dd { margin: 0; font-size: 13px; font-weight: 600; }
.field-label { display: block; margin-top: 24px; text-align: left; font-size: 13px; font-weight: 600; }
.text-input { width: 100%; margin-top: 8px; padding: 11px 12px; border: 1px solid #dce2e8; border-radius: 9px; outline: none; background: #fff; color: #172033; font: inherit; }
.text-input:focus { border-color: #31c8f4; box-shadow: 0 0 0 3px rgb(49 200 244 / 14%); }
.field-help { text-align: left; font-size: 12px !important; }

.primary-button { margin-top: 22px; padding: 11px 19px; border: 0; border-radius: 9px; background: #31c8f4; color: #fff; cursor: pointer; font-weight: 600; transition: background .15s; }
.primary-button:hover { background: #22b8e3; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.inline-status { min-height: 21px; }
.inline-status.success { color: #27975a; }
.inline-status.error { color: #c74343; }

.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid #dfe4e9; border-radius: 10px; background: #fff; color: #667184; cursor: pointer; font-size: 20px; }
.icon-button:hover { border-color: #31c8f4; color: #168db1; }
.task-list { display: grid; gap: 10px; }
.task-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 16px; border: 1px solid #e5e9ee; border-radius: 12px; outline: none; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.task-card:hover, .task-card:focus-visible { border-color: #31c8f4; box-shadow: 0 5px 18px rgb(34 60 80 / 8%); transform: translateY(-1px); }
.task-title { overflow-wrap: anywhere; margin: 0 0 10px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.task-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; color: #6d7787; font-size: 12px; }
.status-badge { align-self: start; padding: 5px 9px; border-radius: 999px; background: #edf8fd; color: #168db1; font-size: 11px; white-space: nowrap; }
.status-badge.done { background: #ebf8ef; color: #2b9758; }
.status-badge.overdue { background: #fff0f0; color: #cf4141; }

.state-view { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #7b8595; text-align: center; }
.state-view p { margin: 0; font-size: 14px; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #eaf8ef; color: #2b9758; font-size: 20px; }
.spinner { width: 26px; height: 26px; border: 3px solid #dce4e9; border-top-color: #31c8f4; border-radius: 50%; animation: spin .8s linear infinite; }
.error-state { color: #c74343; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .app { padding: 14px; }
  .message-panel { margin-top: 20px; padding: 24px 18px; }
  .task-card { grid-template-columns: 1fr; }
  .status-badge { justify-self: start; }
}
