/* Taskly web — accessible, elderly-friendly baseline */

:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #1a1a1e;
  --muted: #5c5c66;
  --primary: #1e5a8a;
  --primary-hover: #164a72;
  --border: #d8dce3;
  --focus: #2563eb;
  --radius: 14px;
  --touch-min: 52px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 112%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

#app {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1rem 1rem 5rem;
  min-height: 100dvh;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

p.muted {
  color: var(--muted);
  margin: 0 0 1rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.card[role="button"],
button.card,
a.card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  text-align: left;
  width: 100%;
  font: inherit;
  min-height: calc(var(--touch-min) + 24px);
}

.card[role="button"]:hover,
button.card:hover {
  border-color: var(--primary);
  outline: 2px solid transparent;
}

.card:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--muted);
}

.row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toolbar button {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: transparent;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="datetime-local"],
textarea {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.65rem 0.85rem;
  font-size: 1.05rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

.field {
  margin-bottom: 1rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  min-height: var(--touch-min);
}

.check input {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  display: block;
  margin: 0 auto 1rem;
}

.avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--border);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.overlay-inner {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 22rem;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.overlay-inner h2 {
  text-align: center;
}

.offer-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

.offer-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.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;
}

[hidden] {
  display: none !important;
}

.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-plain li {
  margin-bottom: 0.5rem;
}

.status-live {
  padding: 0.75rem;
  background: #e8f2fc;
  border-radius: 10px;
  margin-bottom: 1rem;
}
