/* Life OS Time Logger Tab Styles */
/* =========================================================================
   6. TIME LOGGER MODULE: ONE-TAP GRID, SERVER-SIDE STOPWATCH & ROI ENGINE
   ========================================================================= */
.time-logger-card {
  margin-bottom: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  box-shadow: 0 2px 10px rgba(80, 70, 50, 0.03);
}

.time-logger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tl-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.tl-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.tl-status-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
}

.tl-status-led.recording {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-dot 1s infinite alternate;
}

.tl-header-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.tl-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 3px 8px;
  font-size: 0.73rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.tl-today-label {
  font-size: 0.68rem;
  opacity: 0.85;
}

.btn-timeline-toggle {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timeline-toggle:hover {
  background: var(--border-subtle);
}

/* STOPWATCH DOCK */
.tl-stopwatch-dock {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 246, 240, 0.95));
  border: 1.5px solid var(--border-highlight);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  margin-bottom: 1.5px;
  box-shadow: 0 2px 8px rgba(80, 70, 50, 0.03);
  transition: all 0.25s ease;
}

.tl-stopwatch-dock.active {
  border-color: rgba(47, 158, 119, 0.6);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.9));
  box-shadow: 0 4px 14px rgba(47, 158, 119, 0.1);
}

.tl-dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.tl-dock-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}

.tl-dock-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.tl-stop-note-popup {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent-indigo);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(108, 122, 224, 0.16);
  display: flex;
  flex-direction: column;
  gap: 7px;
  animation: modal-pop 0.15s ease-out;
}

.tl-stop-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-indigo);
}

.tl-stop-note-hint {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tl-stop-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-stop-note-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-highlight);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 0.83rem;
  color: var(--text-primary);
}

.tl-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  width: fit-content;
  max-width: 110px;
  color: var(--text-primary);
  flex-shrink: 0;
}

.tl-active-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-width: 18px;
  max-height: 18px;
  flex-shrink: 0;
}

.tl-active-icon img,
.tl-active-icon .act-icon-img,
.pill-timer-text img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  border-radius: 3px;
}

.tl-active-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-recording-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
  display: inline-block;
  flex-shrink: 0;
}

.tl-stopwatch-dock.active .tl-recording-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-dot 0.9s infinite alternate;
}

@keyframes pulse-dot {
  0% { opacity: 0.35; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.2); }
}

.tl-live-timer-display {
  font-family: var(--font-mono);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-live-value-display {
  font-size: 0.84rem;
  font-weight: 700;
}

.tl-dock-controls {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-dock-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-note-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.tl-note-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px var(--accent-indigo-soft);
}

.tl-diy-saved-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.tl-saved-usd-input {
  width: 60px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-emerald);
  outline: none;
  text-align: right;
}

.tl-dock-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tl-credit-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.tl-credit-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-emerald);
  cursor: pointer;
}

.tl-btn-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.btn-timer-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-stop-timer {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
  transition: all 0.15s ease;
  touch-action: manipulation;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-stop-timer .stop-square-icon {
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

.btn-stop-timer:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}

.btn-stop-timer:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-stop-timer:disabled {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn-note-timer {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  background: var(--bg-card-elevated, #27272a);
  border: 1px solid var(--border-subtle, #3f3f46);
  color: var(--text-secondary, #a1a1aa);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-note-timer .note-icon {
  font-size: 0.88rem;
  line-height: 1;
}

.btn-note-timer:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--accent-indigo, #6366f1);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-note-timer.has-note {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.btn-note-timer:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.btn-discard-timer {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-discard-timer .discard-icon {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.btn-discard-timer:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #dc2626;
  transform: translateY(-1px);
}

.btn-discard-timer:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-discard-timer:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none;
}

.tl-live-note-popup {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg-card-elevated, #1f1f23);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md, 8px);
  animation: slideDownNote 0.18s ease-out;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

@keyframes slideDownNote {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tl-live-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary, #cbd5e1);
  font-weight: 500;
}

.btn-close-note {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-close-note:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.tl-live-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-live-note-input {
  flex: 1;
  background: var(--bg-card, #121214);
  border: 1px solid var(--border-subtle, #334155);
  color: var(--text-primary, #f8fafc);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.tl-live-note-input:focus {
  border-color: var(--accent-indigo, #6366f1);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.btn-discard {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-discard:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--accent-rose);
}

