:root {
  color-scheme: dark;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background-color: transparent;
  --bg: rgba(14, 16, 26, 0.94);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #6a9bff;
  --accent-strong: #1f6feb;
  --text: #f5f7ff;
  --muted: #8b92b1;
}

* {
  box-sizing: border-box;
}

.app_injected body {
  margin: 0;  
  background: transparent;
  color: var(--text);
}

.app_injected body:not(.overlay_body) {
  background: white;
}

body {
  margin: 0;
  padding: 10px;  
  color: var(--text);
}



:not(.app_injected) body.overlay_body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.app_injected .overlay {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  max-height: calc(100vh - 20px);
}

.overlay {
  width: 100%;
  background: var(--bg);  
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  /*max-height: calc(100vh - 20px);*/
  max-height: 100vh;
}

.overlay__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.overlay__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.overlay__subtle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.overlay__section {
  margin-bottom: 10px;
}

.overlay__section--scroll {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.issue__tasks {
  flex: 1 1 auto;
  min-height: 0;
}

.tasks__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font-size: 13px;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.issues {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.issue-node {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.issue-node:last-child {
  border-bottom: none;
}

.issue__row {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  padding: 8px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-radius: 10px;
}

.issue-node--selected .issue__row {
  background: rgba(106, 155, 255, 0.08);
}

.issue__info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue__arrow {
  font-size: 11px;
  color: var(--muted);
}

.issue-node__tasks {
  margin: 6px 0 12px 12px;
  padding-left: 10px;
  padding-right: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app_injected .issue-node__tasks {
  margin-left:0px;
}

.issue-node__tasks[hidden] {
  display: none;
}

.issue__tasks-status {
  margin: 0;
}

.tasks--embedded {
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
}

.tasks--embedded .task {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tasks--embedded .task:last-child {
  border-bottom: none;
}

.issue__tasks-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
}

.issue-task-form {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-form-toggle {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
}

.task-form-toggle .small {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.task {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.task:last-child {
  border-bottom: none;
}

.task__title {
  margin: 0;
  font-size: 13px;
}

.task__state {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.task--selected {
  background: rgba(22, 197, 94, 0.15);
  border-left: 3px solid #22c55e;
  padding-left: 7px;
}

.btn.task--selected {
  background: rgba(22, 197, 94, 0.15);
  /*border-left: 3px solid #22c55e;*/
  padding-left: 7px;
}

.btn.task--selected.task--active {
  background: rgba(22, 197, 94, 0.15);
  border: 3px solid #22c55e;
  padding-left: 7px;
}


.task-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.full-width {
  width: 100%;
}

.issue {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.15s ease;
}

.issue:last-child {
  border-bottom: none;
}

.issue__title {
  margin: 0;
  font-size: 13px;
  text-align:left;
}

.issue__meta {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.issue:hover {
  background: rgba(255, 255, 255, 0.04);
}

.issue--selected {
  background: rgba(106, 155, 255, 0.15);
  border-left: 3px solid var(--accent);
  padding-left: 7px;
}

.issue--last {
  position: relative;
}

.issue--last::after {
  content: '★';
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 10px;
  color: var(--accent);
}

.badge {
  background: rgba(106, 155, 255, 0.2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  margin-bottom: 10px;
}

.overlay__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timer__label {
  font-size: 12px;
  color: var(--muted);
}

.timer__value {
  font-size: 24px;
  font-weight: 600;
}

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

.btn {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease;
}

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

.btn.primary {
  border-color: var(--accent);
  background: var(--accent-strong);
}

.btn--go {
  background: #22c55e;
  border-color: #16a34a;
  color: #031b0a;
  font-weight: 600;
}

.btn--go:hover:not(:disabled) {
  background: #16a34a;
  color: #e8ffe9;
}

.btn--stop {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
  font-weight: 600;
}

.btn--stop:hover:not(:disabled) {
  background: #ef4444;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.task-form[hidden] {
  display: none;
}
