* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f3f4f6;
  color: #111827;
  min-height: 100vh;
}

/* ── Lista ── */
#view-list {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

#view-list header { margin-bottom: 20px; }
#view-list h1 { font-size: 22px; font-weight: 700; }
#view-list header p { font-size: 14px; color: #6b7280; margin-top: 4px; }

#ticket-list {
  list-style: none;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

#ticket-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

#ticket-list li:last-child { border-bottom: none; }
#ticket-list li:hover { background: #f9fafb; }
#ticket-list li.loading { color: #9ca3af; cursor: default; font-weight: 400; }
.arrow { color: #9ca3af; font-size: 20px; font-weight: 300; }

/* ── Detalle ── */
#view-detail {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

#view-detail > header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

#btn-back {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  font-weight: 500;
}
#btn-back:hover { background: #f3f4f6; }

#ticket-gid { font-size: 12px; color: #9ca3af; }

#view-detail main { display: flex; flex-direction: column; }

#ticket-name { font-size: 18px; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }

#ticket-notes {
  font-size: 13px;
  color: #374151;
  line-height: 1.65;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 24px;
  white-space: pre-wrap;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

#effort-buttons { display: flex; gap: 8px; margin-bottom: 20px; }

.effort-btn {
  padding: 8px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #374151;
  background: #fff;
}
.effort-btn:hover { border-color: #93c5fd; color: #1d4ed8; }
.effort-btn.selected { border-color: #2563eb; color: #2563eb; background: #eff6ff; }

#justification {
  width: 100%;
  min-height: 88px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #111827;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 20px;
}
#justification:focus { outline: none; border-color: #93c5fd; }

#btn-submit {
  width: 100%;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#btn-submit:hover:not(:disabled) { background: #1d4ed8; }
#btn-submit:disabled { background: #93c5fd; cursor: not-allowed; }

#msg-success {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #16a34a;
}
