/* Экраны Tasks поверх общего стиля Aurora (styles.css). Только классы — CSP запрещает встроенные стили. */
:root { --p1: #ff4d6d; --p2: #ff9f43; --p3: #4f8bff; --p4: #8e95c6; }

h2.danger { color: var(--danger); }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.link { background: none; border: 0; color: var(--accent); padding: 8px 0; min-height: 44px; font-weight: 600; }
.icon-btn { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; min-width: 44px; min-height: 44px; font-size: 20px; }
.wide { width: 100%; margin-top: 14px; }
.big { font-size: 17px; padding: 40px 12px; }
.badge { display: inline-block; margin: 4px 0 0; padding: 4px 10px; border-radius: 10px; background: var(--card); color: var(--hint); font-size: 13px; }
.hint { font-size: 13px; margin-top: 10px; }

/* Строка задачи */
.task { cursor: pointer; }
.task.child { padding-left: 30px; }
.task.overdue .row-sub { color: var(--danger); }
/* Кнопка 44×44 (удобно пальцу), кружок внутри — 26 px. */
.check {
  flex: none; width: 44px; height: 44px; margin: -9px -6px -9px -9px; padding: 0; border: 0; background: none; position: relative;
}
.check::before {
  content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid var(--p4); background: transparent;
}
.check.p1::before { border-color: var(--p1); background: rgba(255, 77, 109, 0.12); }
.check.p2::before { border-color: var(--p2); background: rgba(255, 159, 67, 0.12); }
.check.p3::before { border-color: var(--p3); background: rgba(79, 139, 255, 0.12); }
.check::after { content: ''; position: absolute; inset: 14px; border-radius: 50%; transform: scale(0); transition: transform 0.15s; background: var(--ok); }
.check.done::after { transform: scale(1); }
.check:active::after { transform: scale(0.6); }
.struck { text-decoration: line-through; color: var(--hint); }

/* Проекты */
.project { cursor: pointer; }
.pdot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: linear-gradient(135deg, var(--violet-1), var(--violet-2)); }
.pdot.inbox { background: var(--p3); }
.pdot.bot { background: #2dd4bf; }
.count { color: var(--hint); font-size: 14px; min-width: 24px; text-align: right; }

/* Кнопка добавления и нижние вкладки */
.fab {
  position: fixed; right: max(16px, calc(50vw - 284px)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5;
  width: 56px; height: 56px; border-radius: 50%; border: 0; font-size: 30px; line-height: 1;
  background: linear-gradient(135deg, var(--violet-1), var(--violet-2)); color: var(--accent-text);
  box-shadow: 0 10px 24px rgba(109, 93, 252, 0.45);
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: center; gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(10, 15, 42, 0.86); border-top: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
:root[data-theme="telegram"] .tabbar { background: var(--bg); }
.tab { flex: 1; max-width: 190px; min-height: 52px; border: 0; background: none; color: var(--hint); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; gap: 2px; }
.tab-icon { font-size: 20px; }
.tab.on { color: var(--text); background: var(--card); }

/* Нижний лист */
.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.45); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 600px; margin: 0 auto;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
  background: #121741; border: 1px solid var(--glass-border); box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.4);
}
:root[data-theme="telegram"] .sheet { background: var(--bg); }
.sheet h3 { margin: 6px 0 4px; font-size: 17px; }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 8px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--glass-border); font-size: 13px; }

/* Редактор */
.editor { display: flex; flex-direction: column; gap: 10px; }
.editor textarea.field { padding: 12px 14px; resize: vertical; min-height: 48px; line-height: 1.35; }
.editor .title { font-size: 18px; font-weight: 600; }
.lbl { font-size: 13px; color: var(--hint); margin: 4px 4px -4px; }
.pair { display: flex; gap: 8px; }
.pair .field { flex: 1; min-width: 0; }
select.field { appearance: none; -webkit-appearance: none; }
.seg { display: flex; gap: 6px; }
.seg-btn { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--card); font-weight: 600; }
.seg-btn.p1 { color: var(--p1); } .seg-btn.p2 { color: var(--p2); } .seg-btn.p3 { color: var(--p3); } .seg-btn.p4 { color: var(--p4); }
.seg-btn.on { background: linear-gradient(135deg, var(--violet-1), var(--violet-2)); color: var(--accent-text); border-color: transparent; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--hint); min-height: 44px; }
.check-line input { width: 20px; height: 20px; accent-color: var(--accent); }
.add-sub { margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions .btn { flex: 1 1 40%; }
.danger-text { color: var(--danger) !important; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-action { background: none; border: 0; color: #b9b0ff; font-weight: 700; padding: 0 12px; min-height: 44px; min-width: 64px; }
.btn.danger-bg { background: var(--danger); box-shadow: none; }
