/* Job tracker — three-column layout */

.jr-body {
  margin: 0;
  background: #0f0f0f;
  color: #e5e5e5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  height: 100vh;
  overflow: hidden;
}

.jr-app {
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  height: 100vh;
}

.jr-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #222;
  min-width: 0;
}
.jr-col-right { border-right: none; border-left: 1px solid #222; }

.jr-col-head {
  padding: 16px 18px;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  box-sizing: border-box;
}
.jr-col-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #999;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jr-sub {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.jr-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}
.jr-list li {
  padding: 10px 18px;
  cursor: pointer;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.jr-list li:hover { background: #181818; }
.jr-list li.active {
  background: #1a1a1a;
  border-left-color: #4a9eff;
  color: #fff;
}
.jr-list li .jr-count {
  font-size: 11px;
  color: #555;
  background: #222;
  padding: 2px 8px;
  border-radius: 10px;
}

.jr-add {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #222;
}
.jr-add input[type="text"] {
  flex: 1;
  background: #181818;
  border: 1px solid #2a2a2a;
  color: #e5e5e5;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  min-width: 0;
}
.jr-add input[type="text"]:focus {
  outline: none;
  border-color: #4a9eff;
}

.jr-btn {
  background: #2a2a2a;
  color: #e5e5e5;
  border: 1px solid #333;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}
.jr-btn:hover { background: #333; }
.jr-btn-primary { background: #4a9eff; border-color: #4a9eff; color: #fff; }
.jr-btn-primary:hover { background: #3a8eef; }
.jr-btn-danger { background: #7a2222; border-color: #7a2222; color: #fff; }
.jr-btn-danger:hover { background: #8a2222; }
.jr-btn-sm { padding: 5px 10px; font-size: 12px; }

/* Jobs tree */

.jr-jobs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.jr-job {
  padding: 0;
}
.jr-job-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-left: 3px solid transparent;
  cursor: pointer;
  position: relative;
}
.jr-job-row:hover { background: #181818; }
.jr-job-row.active {
  background: #1a1a1a;
  border-left-color: #4a9eff;
}
.jr-job-row input[type="checkbox"] {
  cursor: pointer;
  accent-color: #4a9eff;
  flex-shrink: 0;
}
.jr-job-title {
  flex: 1;
  font-size: 14px;
  color: #e5e5e5;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jr-job-title.done {
  color: #666;
  text-decoration: line-through;
}
.jr-job-title[contenteditable="true"] {
  background: #222;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: normal;
  overflow: visible;
  outline: 1px solid #4a9eff;
}
.jr-job-actions {
  display: none;
  gap: 4px;
  flex-shrink: 0;
}
.jr-job-row:hover .jr-job-actions { display: flex; }
.jr-icon-btn {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 14px;
  border-radius: 3px;
  line-height: 1;
}
.jr-icon-btn:hover { background: #2a2a2a; color: #fff; }
.jr-icon-btn.danger:hover { color: #ff6b6b; }

.jr-children {
  margin-left: 24px;
  border-left: 1px solid #222;
}

.jr-empty {
  padding: 40px 20px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

/* Right column */

.jr-right-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.jr-timer-box {
  background: #181818;
  border: 1px solid #252525;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}
.jr-timer {
  font-size: 36px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.jr-timer.running { color: #4a9eff; }
.jr-timer-total {
  font-size: 12px;
  color: #888;
  margin-bottom: 14px;
}
.jr-timer-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.jr-timer-actions .jr-btn { min-width: 90px; }

.jr-manual summary {
  cursor: pointer;
  color: #888;
  font-size: 13px;
  padding: 4px 0;
  user-select: none;
}
.jr-manual summary:hover { color: #ccc; }
.jr-manual-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 4px;
}
.jr-manual-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #888;
}
.jr-manual-form input {
  background: #181818;
  border: 1px solid #2a2a2a;
  color: #e5e5e5;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
}
.jr-manual-form input:focus {
  outline: none;
  border-color: #4a9eff;
}
.jr-manual-form .jr-btn { align-self: flex-start; }

.jr-entries h3,
.jr-notes h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  margin: 0 0 10px;
}
.jr-entries-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}
.jr-entries-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid #1a1a1a;
  gap: 10px;
}
.jr-entries-list .jr-ent-meta {
  color: #777;
  font-size: 11px;
}
.jr-entries-list .jr-ent-dur {
  color: #e5e5e5;
  font-variant-numeric: tabular-nums;
  min-width: 56px;
}
.jr-entries-list .running { color: #4a9eff; }

.jr-notes {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 160px;
}
.jr-notes textarea {
  flex: 1;
  background: #181818;
  border: 1px solid #252525;
  color: #e5e5e5;
  padding: 10px;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 140px;
}
.jr-notes textarea:focus {
  outline: none;
  border-color: #4a9eff;
}
.jr-notes-status {
  color: #555;
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 8px;
}

/* Toast */

.jr-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #222;
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
  border: 1px solid #333;
}
.jr-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.jr-toast.error { border-color: #7a2222; }

@media (max-width: 900px) {
  .jr-app {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    height: auto;
    min-height: 100vh;
  }
  .jr-body { overflow: auto; height: auto; }
  .jr-col { border-right: none; border-bottom: 1px solid #222; }
  .jr-col-right { border-left: none; }
}
